You are not logged in.

#1 2010-12-19 11:59:06

gauthma
Member
Registered: 2010-02-16
Posts: 218
Website

Lisp and packages

This is probably a really noob mistake... but I just can't figure it out. I've been reading "Practical Common Lisp", and I decided to take a look at the code. I've set up Emacs and Slime, and so I decided to write a piece of code that used a testing framework, that is developed in Chapter 9. Here's my really simple code:

(asdf:oos 'asdf:load-op :test-framework)

(use-package :com.gigamonkeys.test)

(deftest test-+ ()
  (check
   (= (+ 1 2) 3)
   (= (+ 1 2 3) 6)
   (= (+ -1 -4) -5)))

This doesn't work (i.e. compiling the file fails). But if I run the first two lines directly in the REPL, then it works: the file compile and runs properly. What am I doing wrong? Is there a different way to load packages when you do it from a script? I've googled this ad nauseum, but so far turned out empty....

Offline

Board footer

Powered by FluxBB