diff --git a/test-suite/tests/popen.test b/test-suite/tests/popen.test index 01907d6f5..424af7c3d 100644 --- a/test-suite/tests/popen.test +++ b/test-suite/tests/popen.test @@ -115,7 +115,7 @@ (open-input-pipe "read line && echo $line"))))) (display "hello\n" (cdr p2c)) (force-output (cdr p2c)) - (let ((result (eq? (read port)) 'hello)) + (let ((result (eq? (read port) 'hello))) (close-port (cdr p2c)) (close-pipe port) result))) diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test index 47d39fcc8..73e72a84d 100644 --- a/test-suite/tests/posix.test +++ b/test-suite/tests/posix.test @@ -396,10 +396,12 @@ (with-error-to-port port (lambda () (system* "sh" "-c" "echo bong >&2")))))))) - - (delete-file file) - (and (zero? (status:exit-val status)) - (get-string-all port)))) + (let* ((input (get-string-all port)) + (exitval (status:exit-val status))) + (close port) + (delete-file file) + (and (zero? exitval) + input)))) (pass-if-equal "https://bugs.gnu.org/63024" 0 @@ -458,7 +460,7 @@ (pass-if-equal "wc with stdin and stdout redirects" "2\n" - (unless (defined? 'SIGPIPE) + (when mingw? ;; This test expects a closing pipe to kill the spawned process. (throw 'unsupported)) (let* ((a+b (pipe))