1 USING: arrays io io.files kernel math parser strings system
2 tools.test words namespaces make io.encodings.8-bit
3 io.encodings.binary sequences ;
7 "resource:core/io/test/no-trailing-eol.factor" run-file
8 "foo" "io.tests" lookup
12 "This is a line.\rThis is another line.\r"
14 "resource:core/io/test/mac-os-eol.txt" latin1 <file-reader>
15 [ 500 read ] with-input-stream
21 "resource:core/io/test/binary.txt" latin1 <file-reader>
22 [ read1 ] with-input-stream >fixnum
25 ! Make sure we use correct to_c_string form when writing
26 [ ] [ "\0" write ] unit-test
30 { "It seems " CHAR: J }
31 { "obs has lost h" CHAR: i }
32 { "s grasp on reality again.\n" f }
36 "resource:core/io/test/separator-test.txt"
37 latin1 <file-reader> [
38 "J" read-until 2array ,
39 "i" read-until 2array ,
40 "X" read-until 2array ,
47 10 [ 65536 read drop ] times