adjust test for Windows

Adjusts a test added in 89403dc8cd.
This commit is contained in:
Matthew Flatt 2019-10-14 13:32:01 -06:00
parent c19b944110
commit 81815980d7

View File

@ -1211,12 +1211,22 @@
(close-input-port e)
(subprocess-wait s))
(let ()
(define-values (s i o e) (subprocess #f #f #f (find-exe) "-e" "(let loop () (write-bytes (make-bytes 1024)) (loop))"))
(for ([force-close? '(#t #f)])
(define c (make-custodian))
(define-values (s i o e)
(parameterize ([current-custodian c])
(subprocess #f #f #f (find-exe) "-e" "(let loop () (write-bytes (make-bytes 1024)) (loop))")))
(thread (lambda ()
(sync (system-idle-evt))
(close-output-port o)))
(if (or force-close?
;; For Windows, we need a close that doesn't try
;; to flush, because there's no way to avoid
;; buffering at the rktio level:
(eq? 'windows (system-type)))
(custodian-shutdown-all c)
(close-output-port o))))
(err/rt-test
(let loop ()