1999-08-19 Gary Houston <ghouston@easynet.co.uk>
* tests/ports.test: test line-buffering of fports.
This commit is contained in:
parent
d363921411
commit
0eb2e8cd94
2 changed files with 18 additions and 0 deletions
|
|
@ -1,3 +1,7 @@
|
|||
1999-08-19 Gary Houston <ghouston@easynet.co.uk>
|
||||
|
||||
* tests/ports.test: test line-buffering of fports.
|
||||
|
||||
1999-08-18 Gary Houston <ghouston@easynet.co.uk>
|
||||
|
||||
* tests/ports.test: tests for NUL and non-ASCII chars to fports.
|
||||
|
|
|
|||
|
|
@ -136,6 +136,20 @@
|
|||
(eof-object? (read-char port))))
|
||||
(delete-file filename)))
|
||||
|
||||
;;; line buffering mode.
|
||||
(catch-test-errors
|
||||
(let* ((filename (test-file))
|
||||
(port (open-file filename "wl"))
|
||||
(test-string "one line more or less"))
|
||||
(write-line test-string port)
|
||||
(let* ((in-port (open-input-file filename))
|
||||
(line (read-line in-port)))
|
||||
(close-port in-port)
|
||||
(close-port port)
|
||||
(pass-if "file: line buffering"
|
||||
(string=? line test-string)))
|
||||
(delete-file filename)))
|
||||
|
||||
|
||||
;;;; Pipe ports.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue