Gary Houston's patches turn popen into a module, which we need to

import.
("pipe: read", "pipe: write"): Use close-pipe, not close-port, so
Guile will wait for the command to terminate.
This commit is contained in:
Jim Blandy 1999-05-31 21:30:06 +00:00
commit f5d4dde361

View file

@ -18,7 +18,8 @@
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
(use-modules (test-suite lib))
(use-modules (test-suite lib)
(ice-9 popen))
(define (display-line . args)
(for-each display args)
@ -81,7 +82,7 @@
(catch-test-errors
(let* ((pipe (open-pipe "echo 'Howdy there, partner!'" "r"))
(in-string (read-all pipe)))
(close-port pipe)
(close-pipe pipe)
(pass-if "pipe: read"
(equal? in-string "Howdy there, partner!\n"))))
@ -91,7 +92,7 @@
(pipe (open-pipe (string-append "grep Mommy > " filename) "w")))
(display "Now Jimmy lives on a mushroom cloud\n" pipe)
(display "Mommy, why does everybody have a bomb?\n" pipe)
(close-port pipe)
(close-pipe pipe)
(let ((in-string (read-file filename)))
(pass-if "pipe: write"
(equal? in-string "Mommy, why does everybody have a bomb?\n")))