It works on windows, except for the test, here's a working version:
(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))))))
Another correction would be removing spaces in
+ /* Change working directory if supplied. */
+ if ( pwd ) {
+ if ( chdir ( pwd ) < 0) {
+ goto error_exit;
+ }
+ }
+
so that it reads (pwd) and so on.
With these changes, I will commit it after the freeze.
It works on windows, except for the test, here's a working version:
# +win32 "c:\\") process- output
(sb-ext: run-program #-win32 "/bin/sh"
#-win32 '("-c" "pwd")
#+win32 "cmd.exe"
#+win32 '("/c" "cd")
:output :stream
:directory directory
:search t))))
(string- right-trim '(#\Return) (read-line out))))))
(with-test (:name (:run-program :set-directory))
(let* ((directory #-win32 "/"
(out (sb-ext:
(assert
(equal directory
Another correction would be removing spaces in
+ /* Change working directory if supplied. */
+ if ( pwd ) {
+ if ( chdir ( pwd ) < 0) {
+ goto error_exit;
+ }
+ }
+
so that it reads (pwd) and so on.
With these changes, I will commit it after the freeze.