io.streams: some more test cases for sequence-read-until.

db4
John Benediktsson 2014-03-10 15:29:11 -07:00
parent e966659105
commit ee040a242c
2 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,10 @@ unit-test
] { } make
] unit-test
{ "" CHAR: \r } [
"\r\n" <string-reader> [ "\r" read-until ] with-input-stream
] unit-test
[ "hello" "hi" ] [
"hello\nhi" <string-reader>
dup stream-readln

View File

@ -28,6 +28,12 @@ IN: io.streams.byte-array.tests
[ 1 read drop "\0" read-until ] with-byte-reader
] unit-test
{ B{ } 1 } [
B{ 1 2 3 } binary [ B{ 1 } read-until ] with-byte-reader
] unit-test
[ 1 1 4 11 f ] [
B{ 1 2 3 4 5 6 7 8 9 10 11 12 } binary
[