HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5157b4a
)
* tests/ports.test ("line counter"): Verify that we do eventually
author
Jim Blandy
<jimb@red-bean.com>
Wed, 9 Jun 1999 09:42:15 +0000
(09:42 +0000)
committer
Jim Blandy
<jimb@red-bean.com>
Wed, 9 Jun 1999 09:42:15 +0000
(09:42 +0000)
get EOF on the port --- don't just read forever.
test-suite/tests/ports.test
patch
|
blob
|
blame
|
history
diff --git
a/test-suite/tests/ports.test
b/test-suite/tests/ports.test
index
4b6ab50
..
c36e3b4
100644
(file)
--- a/
test-suite/tests/ports.test
+++ b/
test-suite/tests/ports.test
@@
-171,9
+171,12
@@
(equal? (read-line port) second-line))
(pass-if "read-line increments line number"
(= (port-line port) 2))
- (let loop ()
- (if (not (eof-object? (read-line port)))
- (loop)))
+ (pass-if "read-line returns EOF"
+ (let loop ((i 0))
+ (cond
+ ((eof-object? (read-line port)) #t)
+ ((> i 20) #f)
+ (else (loop (+ i 1))))))
(pass-if "line count is 5 at EOF"
(= (port-line port) 5))))
ports port-list-names)