Commit 37c4d945 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Use lisp-invocation 1.0.1 to better support LispWorks.

parent 01cf051c
......@@ -25,7 +25,7 @@
(unless (find-system :lisp-invocation nil)
(leave-test "Couldn't find lisp-invocation. Skipping the rest of the test." 0))
(load-system :lisp-invocation)
(unless (version-satisfies (find-system :lisp-invocation) "1")
(unless (version-satisfies (find-system :lisp-invocation) "1.0.1")
(leave-test "Lisp-invocation library isn't new enough to test successfully. Skipping test-program." 0))
;; Disable any user source registry.
(initialize-source-registry `(:source-registry :ignore-inherited-configuration))
......@@ -34,16 +34,15 @@
(assert-equal
0
(nth-value 2
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~a)" kind))
:input nil :ignore-error-status t
:output (list *standard-output* :linewise t :prefix "stdout: ")
:error-output (list *error-output* :linewise t :prefix "stderr: ")))))
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~a)" kind)
:run-program-args
`(:input nil :ignore-error-status t
:output (,*standard-output* :linewise t :prefix "stdout: ")
:error-output (,*error-output* :linewise t :prefix "stderr: "))))))
#-(or (and lispworks os-macosx)
(and ecl os-macosx))
......@@ -60,28 +59,24 @@
(assert-equal
(nest
#+lispworks (last)
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)")
:output :lines :error-output t))
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:cross-compile nil
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:run-program-args '(:output :lines :error-output t)))
'("hello, world"))
(DBG "- now, use it with arguments")
#-(or lispworks scl) ;; These can't be passed arguments the normal way
(assert-equal
(run-program
(symbol-call
:lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:cross-compile nil
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d"))
:output :lines :error-output t)
(lisp-invocation:invoke-lisp
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:cross-compile nil
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d")
:run-program-args '(:output :lines :error-output t))
'("hello, world"
"You passed 3 arguments:"
" \"a\""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment