1999-08-19 Gary Houston <ghouston@easynet.co.uk>
authorGary Houston <ghouston@arglist.com>
Thu, 19 Aug 1999 21:29:00 +0000 (21:29 +0000)
committerGary Houston <ghouston@arglist.com>
Thu, 19 Aug 1999 21:29:00 +0000 (21:29 +0000)
* tests/ports.test: test line-buffering of fports.

test-suite/ChangeLog
test-suite/tests/ports.test

index b1ad886..175b814 100644 (file)
@@ -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.
index 88153ec..ce796d1 100644 (file)
              (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)))
+
 \f
 ;;;; Pipe ports.