diff options
| author | Mistivia <i@mistivia.com> | 2025-12-27 01:45:03 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-12-27 01:45:03 +0800 |
| commit | 0ab2f1ed9db065dac95f8827df0ef523a8597bd9 (patch) | |
| tree | 52377c351db11317c364798c1df0a00fd44ca48a /tests/io.lisp | |
| parent | 1232e077f5273d86600cb4a4c34269310f9f2b9f (diff) | |
exts
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 |
