source: project/chicken/branches/release/tests/port-tests.scm @ 7931

Last change on this file since 7931 was 7931, checked in by felix winkelmann, 12 years ago

merged from prerelease branch rev. 7930 - release version 3.0.0; fixed wrong version numbers in some files

File size: 1.0 KB
Line 
1(use srfi-1)
2
3(define *text* #<<EOF
4this is a test
5<foof> #;33> (let ((in (open-input-string ""))) (close-input-port in)
6       (read-char in)) [09:40]
7<foof> Error: (read-char) port already closed: #<input port "(string)">
8<foof> #;33> (let ((in (open-input-string ""))) (close-input-port in)
9       (read-line in))
10<foof> Error: call of non-procedure: #t
11<foof> ... that's a little odd
12<Bunny351> yuck. [09:44]
13<Bunny351> double yuck. [10:00]
14<sjamaan> yuck squared! [10:01]
15<Bunny351> yuck powered by yuck
16<Bunny351> (to the power of yuck, of course) [10:02]
17<pbusser3> My yuck is bigger than yours!!!
18<foof> yuck!
19<foof> (that's a factorial)
20<sjamaan> heh
21<sjamaan> I think you outyucked us all [10:03]
22<foof> well, for large enough values of yuck, yuck! ~= yuck^yuck [10:04]
23ERC> 
24EOF
25)
26
27(define p (open-input-string *text*))
28
29(assert (string=? "this is a test" (read-line p)))
30
31(assert
32 (string=?
33  "<foof> #;33> (let ((in (open-input-string \"\"))) (close-input-port in)"
34  (read-line p)))
35(assert (= 20 (length (read-lines (open-input-string *text*)))))
Note: See TracBrowser for help on using the repository browser.