ikarus/scheme/tests/input-ports.ss

17 lines
454 B
Scheme
Raw Normal View History

(library (tests input-ports)
(export test-input-ports)
(import (ikarus) (tests framework))
(define-tests test-input-ports
[eof-object?
2007-12-10 09:28:48 -05:00
(get-line (open-string-input-port ""))]
[(lambda (x) (equal? x "abcd"))
2007-12-10 09:28:48 -05:00
(get-line (open-string-input-port "abcd"))]
[(lambda (x) (equal? x ""))
2007-12-10 09:28:48 -05:00
(get-line (open-string-input-port "\nabcd"))]
[(lambda (x) (equal? x "abcd"))
2007-12-10 09:28:48 -05:00
(get-line (open-string-input-port "abcd\nefg"))]))