diff --git a/test/test-multiple.script b/test/test-multiple.script index ed62f54a6184cca0e04a35efe81e7cf6a0ed9430..f71c1847b95f80762dcebe0db144baf79c4bd88a 100644 --- a/test/test-multiple.script +++ b/test/test-multiple.script @@ -7,13 +7,15 @@ (setf *central-registry* `(,*test-directory* ,tmp)) ;; Don't rely on ln -s on Windows -(unless (os-windows-p) - (run-program - (format nil "ln -sf ~A ~A" - (native-namestring asd) - (native-namestring asd2))) - (oos 'load-source-op 'test-multiple-too) - (assert (asymval :*file3* :test-package))) - +(cond + ((os-unix-p) + (run-program + (format nil "ln -sf ~A ~A" + (native-namestring asd) + (native-namestring asd2))) + (oos 'load-source-op 'test-multiple-too)) + (t + (oos 'load-source-op 'test-multiple))) +(assert (asymval :*file3* :test-package)) (load-system 'test-multiple-free) (assert (probe-file* file4)) diff --git a/test/test-run-program.script b/test/test-run-program.script index 3787d8b1bb6d4bed59dda37e37181ea1f3757122..98a74c5dad001779d16a3eb6ebae39ce48de17a6 100644 --- a/test/test-run-program.script +++ b/test/test-run-program.script @@ -25,21 +25,26 @@ (unless (equal 0 (run-shell-command "./good-shell-command")) (error "Failed to capture exit status indicating shell command success."))) +;; On Windows, normalize away CRLF into jut the unixy LF. +(defun remove-cr (x) (remove (code-char 13) x)) + (DBG "Testing awkward legacy output capture via run-shell-command") (let ((ok1 (format nil "; $ echo ok 1~%ok 1~%"))) (assert-equal - (with-output-to-string (s) - (let ((*verbose-out* s)) - (run-shell-command "echo ~A 1" "ok"))) + (remove-cr + (with-output-to-string (s) + (let ((*verbose-out* s)) + (run-shell-command "echo ~A 1" "ok")))) ok1) #-ecl (assert-equal - (with-output-to-string (s) - (let ((*verbose-out* t) - (*standard-output* s)) - (let ((status (run-shell-command "echo ok ~D" 1))) - (unless (zerop status) - (error "Didn't get good exit status."))))) + (remove-cr + (with-output-to-string (s) + (let ((*verbose-out* t) + (*standard-output* s)) + (let ((status (run-shell-command "echo ok ~D" 1))) + (unless (zerop status) + (error "Didn't get good exit status.")))))) ok1)) ;; NB1: run-shell-command is deprecated. Use run-program instead. @@ -48,7 +53,7 @@ (assert-equal '("ok 1") (run-program "echo ok 1" :output :lines)) (assert-equal "ok 1" (run-program '("echo" "ok 1") :output :line)) (assert-equal '(:ok 1) (run-program '("echo" ":ok 1") :output :forms)) -(assert-equal (format nil "ok 1~%") (run-program '("echo" "ok 1") :output :string)) +(assert-equal (format nil "ok 1~%") (remove-cr (run-program '("echo" "ok 1") :output :string))) ;; this test checks for a problem there was in allegro -- :output :interactive ;; would try to open T as a stream for INPUT. (assert-equal 0 (run-program "true" :force-shell t :output :interactive))