io: fix file-stream-buffer-mode on file output ports

This commit is contained in:
Matthew Flatt 2019-02-13 10:20:04 -07:00
parent c2d53143c1
commit 5339a36187
2 changed files with 5 additions and 2 deletions

View File

@ -887,6 +887,9 @@
(define ofile (open-output-file path #:mode 'text #:exists 'replace)) (define ofile (open-output-file path #:mode 'text #:exists 'replace))
(fprintf ofile "abc\ndef\nghi\n") (fprintf ofile "abc\ndef\nghi\n")
(test 'block file-stream-buffer-mode ofile)
(test (void) file-stream-buffer-mode ofile 'line)
(test 'line file-stream-buffer-mode ofile)
(close-output-port ofile) (close-output-port ofile)
(let () (let ()

View File

@ -271,8 +271,8 @@
;; in atomic mode ;; in atomic mode
[buffer-mode [buffer-mode
(case-lambda (case-lambda
[(self) buffer-mode] [() buffer-mode]
[(self mode) (set! buffer-mode mode)])] [(mode) (set! buffer-mode mode)])]
#:property #:property
[prop:file-stream (lambda (p) (fd-output-port-fd p))] [prop:file-stream (lambda (p) (fd-output-port-fd p))]