diff options
Diffstat (limited to 'tests/io.lisp')
| -rw-r--r-- | tests/io.lisp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/io.lisp b/tests/io.lisp new file mode 100644 index 0000000..9a7d3dc --- /dev/null +++ b/tests/io.lisp @@ -0,0 +1,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)
\ No newline at end of file |
