1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Other test fixes

This commit is contained in:
Michael Gran 2025-03-30 21:17:40 -07:00
parent 2b5528847d
commit 2a7c9292bf
2 changed files with 8 additions and 6 deletions

View file

@ -115,7 +115,7 @@
(open-input-pipe "read line && echo $line"))))) (open-input-pipe "read line && echo $line")))))
(display "hello\n" (cdr p2c)) (display "hello\n" (cdr p2c))
(force-output (cdr p2c)) (force-output (cdr p2c))
(let ((result (eq? (read port)) 'hello)) (let ((result (eq? (read port) 'hello)))
(close-port (cdr p2c)) (close-port (cdr p2c))
(close-pipe port) (close-pipe port)
result))) result)))

View file

@ -396,10 +396,12 @@
(with-error-to-port port (with-error-to-port port
(lambda () (lambda ()
(system* "sh" "-c" "echo bong >&2")))))))) (system* "sh" "-c" "echo bong >&2"))))))))
(let* ((input (get-string-all port))
(delete-file file) (exitval (status:exit-val status)))
(and (zero? (status:exit-val status)) (close port)
(get-string-all port)))) (delete-file file)
(and (zero? exitval)
input))))
(pass-if-equal "https://bugs.gnu.org/63024" (pass-if-equal "https://bugs.gnu.org/63024"
0 0
@ -458,7 +460,7 @@
(pass-if-equal "wc with stdin and stdout redirects" (pass-if-equal "wc with stdin and stdout redirects"
"2\n" "2\n"
(unless (defined? 'SIGPIPE) (when mingw?
;; This test expects a closing pipe to kill the spawned process. ;; This test expects a closing pipe to kill the spawned process.
(throw 'unsupported)) (throw 'unsupported))
(let* ((a+b (pipe)) (let* ((a+b (pipe))