This should be a good test. I can't really think of any others (other than using different values for DIRECTORY).
(with-test (:name (:run-program :set-directory)) (let* ((directory #-win32 "/" #+win32 "c:\\") (pwd (sb-ext:run-program #-win32 "/bin/sh" #-win32 '("-c" "pwd") #+win32 "c:\\windows\\system32\\cmd.exe" #+win32 '("/c" "cd") :output :stream :directory directory))) (unwind-protect (assert (string= (read-line (sb-ext:process-output pwd)) directory)) (sb-ext:process-close pwd))))
Again, I'm not sure about the Windows version.
This should be a good test. I can't really think of any others (other than using different values for DIRECTORY).
(with-test (:name (:run-program :set-directory))
# +win32 "c:\\")
# -win32 '("-c" "pwd")
# +win32 "c:\\windows\ \system32\ \cmd.exe"
# +win32 '("/c" "cd")
: output :stream
: directory directory))) process- output pwd)) directory)) sb-ext: process- close pwd))))
(let* ((directory #-win32 "/"
(pwd (sb-ext:run-program #-win32 "/bin/sh"
(unwind-protect
(assert (string= (read-line (sb-ext:
(
Again, I'm not sure about the Windows version.