X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Frun-program.impure.lisp;h=0088c56d6581d927884acc031b02bb88fc9cbd03;hb=1fa1730414b6c914e502d339945d0ad7a4a7f5d9;hp=95da2dcd8645a2fe1e0a4293c8e1287b56d835fa;hpb=f9663e4a4c35614fcba5812882f9ed812cbcf62d;p=sbcl.git diff --git a/tests/run-program.impure.lisp b/tests/run-program.impure.lisp index 95da2dc..0088c56 100644 --- a/tests/run-program.impure.lisp +++ b/tests/run-program.impure.lisp @@ -160,8 +160,8 @@ ;;; buffering of stdin and stdout depends on their TTYness, and ed isn't sufficiently ;;; agressive about flushing them. So, here's another test using :PTY. -#-win32 ( ;; kludge: It would be nicer to disable individual test cases, - ;; but we are not using WITH-TEST yet here. +#-win32 (progn ;; kludge: It would be nicer to disable individual test cases, + ;; but we are not using WITH-TEST yet here. (defparameter *tmpfile* "run-program-ed-test.tmp") @@ -322,3 +322,19 @@ (assert (null (sb-ext:run-program "/bin/cat" '() :output #.(or *compile-file-truename* *load-truename*) :if-output-exists nil))))) + + +(with-test (:name (:run-program :set-directory)) + (let* ((directory #-win32 "/" + #+win32 "c:\\") + (out (sb-ext:process-output + (sb-ext:run-program #-win32 "/bin/sh" + #-win32 '("-c" "pwd") + #+win32 "cmd.exe" + #+win32 '("/c" "cd") + :output :stream + :directory directory + :search t)))) + (assert + (equal directory + (string-right-trim '(#\Return) (read-line out))))))