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:
parent
c94577b445
commit
75efe4535b
2 changed files with 12 additions and 8 deletions
|
@ -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>
|
1999-08-04 Gary Houston <ghouston@easynet.co.uk>
|
||||||
|
|
||||||
* tests/ports.test: tests for buffered and unbuffered input/output
|
* tests/ports.test: tests for buffered and unbuffered input/output
|
||||||
|
|
|
@ -80,17 +80,17 @@
|
||||||
(let* ((filename (test-file))
|
(let* ((filename (test-file))
|
||||||
(port (open-file filename "w+")))
|
(port (open-file filename "w+")))
|
||||||
(display "J'Accuse" port)
|
(display "J'Accuse" port)
|
||||||
(lseek port -1 SEEK_CUR)
|
(seek port -1 SEEK_CUR)
|
||||||
(pass-if "file: r/w 1"
|
(pass-if "file: r/w 1"
|
||||||
(char=? (read-char port) #\e))
|
(char=? (read-char port) #\e))
|
||||||
(pass-if "file: r/w 2"
|
(pass-if "file: r/w 2"
|
||||||
(eof-object? (read-char port)))
|
(eof-object? (read-char port)))
|
||||||
(lseek port -1 SEEK_CUR)
|
(seek port -1 SEEK_CUR)
|
||||||
(write-char #\x port)
|
(write-char #\x port)
|
||||||
(lseek port 7 SEEK_SET)
|
(seek port 7 SEEK_SET)
|
||||||
(pass-if "file: r/w 3"
|
(pass-if "file: r/w 3"
|
||||||
(char=? (read-char port) #\x))
|
(char=? (read-char port) #\x))
|
||||||
(lseek port -2 SEEK_END)
|
(seek port -2 SEEK_END)
|
||||||
(pass-if "file: r/w 4"
|
(pass-if "file: r/w 4"
|
||||||
(char=? (read-char port) #\s))
|
(char=? (read-char port) #\s))
|
||||||
(delete-file filename)))
|
(delete-file filename)))
|
||||||
|
@ -100,17 +100,17 @@
|
||||||
(let* ((filename (test-file))
|
(let* ((filename (test-file))
|
||||||
(port (open-file filename "w+0")))
|
(port (open-file filename "w+0")))
|
||||||
(display "J'Accuse" port)
|
(display "J'Accuse" port)
|
||||||
(lseek port -1 SEEK_CUR)
|
(seek port -1 SEEK_CUR)
|
||||||
(pass-if "file: ub r/w 1"
|
(pass-if "file: ub r/w 1"
|
||||||
(char=? (read-char port) #\e))
|
(char=? (read-char port) #\e))
|
||||||
(pass-if "file: ub r/w 2"
|
(pass-if "file: ub r/w 2"
|
||||||
(eof-object? (read-char port)))
|
(eof-object? (read-char port)))
|
||||||
(lseek port -1 SEEK_CUR)
|
(seek port -1 SEEK_CUR)
|
||||||
(write-char #\x port)
|
(write-char #\x port)
|
||||||
(lseek port 7 SEEK_SET)
|
(seek port 7 SEEK_SET)
|
||||||
(pass-if "file: ub r/w 3"
|
(pass-if "file: ub r/w 3"
|
||||||
(char=? (read-char port) #\x))
|
(char=? (read-char port) #\x))
|
||||||
(lseek port -2 SEEK_END)
|
(seek port -2 SEEK_END)
|
||||||
(pass-if "file: ub r/w 4"
|
(pass-if "file: ub r/w 4"
|
||||||
(char=? (read-char port) #\s))
|
(char=? (read-char port) #\s))
|
||||||
(delete-file filename)))
|
(delete-file filename)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue