blob: 9a7d3dc970c730a6c72e4da3a741e5bce11bc489 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
(defvar fp (open-file "./tests/io-test-input.txt" "r"))
(assert (char= #\a (read-char fp)))
(assert (char= #\b (read-char fp)))
(assert (char= #\c (read-char fp)))
(stream-close fp)
(defvar fp (open-file "./tests/io-test-input.txt" "r"))
(assert (string= "abc" (read-line fp)))
(stream-close fp)
(defvar fp (open-file "./tests/io-test-input.txt" "r"))
(assert (equal? (list "abc" "1234" "123") (lines fp)))
(stream-close fp)
|