]> gitweb.factorcode.org Git - factor.git/commitdiff
io.buffers: adding another test of buffer-read-until.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 9 Nov 2016 18:11:51 +0000 (10:11 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 9 Nov 2016 18:11:51 +0000 (10:11 -0800)
basis/io/buffers/buffers-tests.factor

index c8b1d4abb0d06808b4307033db1060df3534193b..821b025800cb009f582d7119538e298c0dbec442 100644 (file)
@@ -61,6 +61,10 @@ io.buffers kernel libc namespaces sequences strings tools.test ;
 { "hello" CHAR: \s } [ " " "b" get buffer-read-until [ >string ] dip ] unit-test
 "b" get dispose
 
+"hello world" string>buffer "b" set
+{ "hello world" f } [ "\n" "b" get buffer-read-until [ >string ] dip ] unit-test
+"b" get dispose
+
 { 4 B{ 1 2 3 4 0 0 0 0 0 0 } } [
     10 <buffer>
     [ B{ 1 2 3 4 } binary-object rot buffer-write ]