Mon Apr 6 13:43:59 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* make unit test work & test on darcs record
hunk ./src/application.lisp 66
- (let ((cleanup-p (gensym "cleanup-p")))
- `(let ((,cleanup-p nil))
- (multiple-value-setq (*app* ,cleanup-p) ,ensure-app)
- (unwind-protect
- (progn
- ,@body)
- (when ,cleanup-p
- ,remove-app
- (makunbound '*app*))))))
+ `(progn (setf *app* ,ensure-app)
+ (unwind-protect
+ (progn
+ ,@body))))
hunk ./test.lisp 1
-#!/usr/bin/sbcl --script
+#|
+exec -a "$0" sbcl --noinform --noprint --disable-debugger --load $0 --end-toplevel-options "$@"
+# do not use --script to allow loading mudballs with ${HOME}/.sbclrc
+# Used for testing on darcs record.
+|#
hunk ./test.lisp 7
-(load "/home/tobias/software/mudballs/boot.lisp")
hunk ./test.lisp 10
-(defmacro with-extra-search-dir (path &body body)
- "Executes BODY with PATH as additional search directory for Mudball systems."
- `(let ((*custom-search-modules*
- (pushnew (wildcard-searcher
- (make-pathname :name :wild
- :type "mbd"
- :defaults ,path))
- *custom-search-modules*)))
- ,@body))
+(defun load-sysdef (pathname system)
+ (load pathname)
+ (setf (mb.sysdef::pathname-of (find-system system)) pathname))
hunk ./test.lisp 14
-(with-extra-search-dir *default-pathname-defaults*
- (mb:clean :qt)
- (mb:test :qt))
+(defun load-sysdef-file (system-name)
+ "Loads a mbd file in the current directory."
+ (load-sysdef (make-pathname :defaults *default-pathname-defaults*
+ :name (string-downcase system-name)
+ :type "mbd")
+ system-name))
+
+(load-sysdef-file :qt)
+(mb:clean :qt)
+(mb:test :qt)
changepref test
sh ./test.lisp