diff --git a/core/load.factor b/core/load.factor index 8089587589..051d8b7e29 100644 --- a/core/load.factor +++ b/core/load.factor @@ -124,7 +124,6 @@ PROVIDE: core "test/prettyprint.factor" "test/random.factor" "test/redefine.factor" - "test/stream.factor" "test/threads.factor" "test/tuple.factor" "test/words.factor" diff --git a/core/test/io/empty-file.txt b/core/test/io/empty-file.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/core/test/io/io.factor b/core/test/io/io.factor index f37124dcf2..da30d995d2 100644 --- a/core/test/io/io.factor +++ b/core/test/io/io.factor @@ -70,3 +70,21 @@ unit-test "/core/test/io/binary.txt" [ 0.2 read ] with-stream ] unit-test + +[ { } ] +[ "/core/test/io/empty-file.txt" lines ] +unit-test + +[ "xyzzy" ] [ [ "xyzzy" write ] string-out ] unit-test + +[ { "" } ] [ "" string-lines ] unit-test +[ { "" "" } ] [ "\n" string-lines ] unit-test +[ { "" "" } ] [ "\r" string-lines ] unit-test +[ { "" "" } ] [ "\r\n" string-lines ] unit-test +[ { "hello" } ] [ "hello" string-lines ] unit-test +[ { "hello" "" } ] [ "hello\n" string-lines ] unit-test +[ { "hello" "" } ] [ "hello\r" string-lines ] unit-test +[ { "hello" "" } ] [ "hello\r\n" string-lines ] unit-test +[ { "hello" "hi" } ] [ "hello\nhi" string-lines ] unit-test +[ { "hello" "hi" } ] [ "hello\rhi" string-lines ] unit-test +[ { "hello" "hi" } ] [ "hello\r\nhi" string-lines ] unit-test diff --git a/core/test/stream.factor b/core/test/stream.factor deleted file mode 100644 index b7162a8949..0000000000 --- a/core/test/stream.factor +++ /dev/null @@ -1,20 +0,0 @@ -IN: temporary -USE: namespaces -USE: io -USE: test -USE: generic -USE: kernel - -[ "xyzzy" ] [ [ "xyzzy" write ] string-out ] unit-test - -[ { "" } ] [ "" string-lines ] unit-test -[ { "" "" } ] [ "\n" string-lines ] unit-test -[ { "" "" } ] [ "\r" string-lines ] unit-test -[ { "" "" } ] [ "\r\n" string-lines ] unit-test -[ { "hello" } ] [ "hello" string-lines ] unit-test -[ { "hello" "" } ] [ "hello\n" string-lines ] unit-test -[ { "hello" "" } ] [ "hello\r" string-lines ] unit-test -[ { "hello" "" } ] [ "hello\r\n" string-lines ] unit-test -[ { "hello" "hi" } ] [ "hello\nhi" string-lines ] unit-test -[ { "hello" "hi" } ] [ "hello\rhi" string-lines ] unit-test -[ { "hello" "hi" } ] [ "hello\r\nhi" string-lines ] unit-test