diff --git a/src/lisp/init.lisp b/src/lisp/init.lisp index 2c204fa..e427b59 100644 --- a/src/lisp/init.lisp +++ b/src/lisp/init.lisp @@ -82,6 +82,7 @@ (if (probe-file arg) (with-open-file (in arg) (let ((line(read-line in))) + (push :ros.script *features*) (cl:load (make-concatenated-stream (make-string-input-stream (format nil "(cl:setf cl:*load-pathname* #P~S)(cl:setf cl:*load-truename* (truename cl:*load-pathname*))~A" arg @@ -91,7 +92,8 @@ (make-string-input-stream (if (eql cmd :script) "(cl:apply 'main ros:*argv*)" - "")))))) + "")))) + (setf *features* (remove :ros.script *features*)))) (format t "script ~S is not exist~%" arg))) (defun load (x file) diff --git a/t/roswell.ros b/t/roswell.ros index 5e40fba..233e4e7 100755 --- a/t/roswell.ros +++ b/t/roswell.ros @@ -14,14 +14,18 @@ exec ros -- $0 "$@" (in-package :t.roswell) (setf *default-reporter* :list) -(plan 1) +(plan nil) (mapc (lambda (x) (diag (format nil "testing ~a" (pathname-name x))) (load x)) (sort (directory (make-pathname :defaults *load-pathname* :name :wild :type "lisp")) #'string< :key #'pathname-name)) +#+:ros.script (defun main (&rest r) "roswell require main function" (declare (ignore r)) (finalize)) + +#-:ros.script +(finalize)