2 USING: io.crlf tools.test io.streams.string io ;
4 [ "Hello, world." ] [ "Hello, world." [ read-crlf ] with-string-reader ] unit-test
5 [ "Hello, world." ] [ "Hello, world.\r\n" [ read-crlf ] with-string-reader ] unit-test
6 [ "Hello, world.\r" [ read-crlf ] with-string-reader ] must-fail
7 [ f ] [ "" [ read-crlf ] with-string-reader ] unit-test
8 [ "" ] [ "\r\n" [ read-crlf ] with-string-reader ] unit-test
10 [ "foo\r" [ read-?crlf ] with-string-reader ] must-fail
11 [ f ] [ "" [ read-?crlf ] with-string-reader ] unit-test
12 [ "" ] [ "\n" [ read-?crlf ] with-string-reader ] unit-test
13 [ "foo" ] [ "foo\n" [ read-?crlf ] with-string-reader ] unit-test