describe: show the same information about functions for 'x and #'x.
[sbcl.git] / tests / run-program.impure.lisp
index 95da2dc..0088c56 100644 (file)
 ;;; 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")
 
     (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))))))