From 37c4d945cb71a4b973e2c862ab2007c87d5591ee Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Mon, 28 Apr 2014 16:16:56 -0400 Subject: [PATCH] Use lisp-invocation 1.0.1 to better support LispWorks. --- test/test-program.script | 51 ++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/test/test-program.script b/test/test-program.script index b4ee174f..d65c277a 100644 --- a/test/test-program.script +++ b/test/test-program.script @@ -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\"" -- GitLab