1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-23 13:00:34 +02:00

1999-08-12 Gary Houston <ghouston@easynet.co.uk>

* tests/ports.test: lseek -> seek.
This commit is contained in:
Gary Houston 1999-08-12 19:07:19 +00:00
parent c94577b445
commit 75efe4535b
2 changed files with 12 additions and 8 deletions

View file

@ -1,3 +1,7 @@
1999-08-12 Gary Houston <ghouston@easynet.co.uk>
* tests/ports.test: lseek -> seek.
1999-08-04 Gary Houston <ghouston@easynet.co.uk>
* tests/ports.test: tests for buffered and unbuffered input/output

View file

@ -80,17 +80,17 @@
(let* ((filename (test-file))
(port (open-file filename "w+")))
(display "J'Accuse" port)
(lseek port -1 SEEK_CUR)
(seek port -1 SEEK_CUR)
(pass-if "file: r/w 1"
(char=? (read-char port) #\e))
(pass-if "file: r/w 2"
(eof-object? (read-char port)))
(lseek port -1 SEEK_CUR)
(seek port -1 SEEK_CUR)
(write-char #\x port)
(lseek port 7 SEEK_SET)
(seek port 7 SEEK_SET)
(pass-if "file: r/w 3"
(char=? (read-char port) #\x))
(lseek port -2 SEEK_END)
(seek port -2 SEEK_END)
(pass-if "file: r/w 4"
(char=? (read-char port) #\s))
(delete-file filename)))
@ -100,17 +100,17 @@
(let* ((filename (test-file))
(port (open-file filename "w+0")))
(display "J'Accuse" port)
(lseek port -1 SEEK_CUR)
(seek port -1 SEEK_CUR)
(pass-if "file: ub r/w 1"
(char=? (read-char port) #\e))
(pass-if "file: ub r/w 2"
(eof-object? (read-char port)))
(lseek port -1 SEEK_CUR)
(seek port -1 SEEK_CUR)
(write-char #\x port)
(lseek port 7 SEEK_SET)
(seek port 7 SEEK_SET)
(pass-if "file: ub r/w 3"
(char=? (read-char port) #\x))
(lseek port -2 SEEK_END)
(seek port -2 SEEK_END)
(pass-if "file: ub r/w 4"
(char=? (read-char port) #\s))
(delete-file filename)))