fix unit tests that call lines or contents

db4
Doug Coleman 2009-05-01 16:38:04 -05:00
parent 2dc29fe831
commit ce7ad9a42d
7 changed files with 15 additions and 15 deletions

View File

@ -33,7 +33,7 @@ concurrency.promises threads unix.process ;
"cat"
"launcher-test-1" temp-file
2array
ascii <process-reader> contents
ascii <process-reader> stream-contents
] unit-test
[ ] [
@ -52,7 +52,7 @@ concurrency.promises threads unix.process ;
"cat"
"launcher-test-1" temp-file
2array
ascii <process-reader> contents
ascii <process-reader> stream-contents
] unit-test
[ ] [
@ -70,14 +70,14 @@ concurrency.promises threads unix.process ;
"cat"
"launcher-test-1" temp-file
2array
ascii <process-reader> contents
ascii <process-reader> stream-contents
] unit-test
[ t ] [
<process>
"env" >>command
{ { "A" "B" } } >>environment
ascii <process-reader> lines
ascii <process-reader> stream-lines
"A=B" swap member?
] unit-test
@ -86,7 +86,7 @@ concurrency.promises threads unix.process ;
"env" >>command
{ { "A" "B" } } >>environment
+replace-environment+ >>environment-mode
ascii <process-reader> lines
ascii <process-reader> stream-lines
] unit-test
[ "hi\n" ] [
@ -113,13 +113,13 @@ concurrency.promises threads unix.process ;
"append-test" temp-file utf8 file-contents
] unit-test
[ t ] [ "ls" utf8 <process-stream> contents >boolean ] unit-test
[ t ] [ "ls" utf8 <process-stream> stream-contents >boolean ] unit-test
[ "Hello world.\n" ] [
"cat" utf8 <process-stream> [
"Hello world.\n" write
output-stream get dispose
input-stream get contents
input-stream get stream-contents
] with-stream
] unit-test

View File

@ -35,4 +35,4 @@ concurrency.promises io.encodings.ascii io threads calendar ;
dup start-server* sockets>> first addr>> port>> "port" set
] unit-test
[ "Hello world." ] [ "localhost" "port" get <inet> ascii <client> drop contents ] unit-test
[ "Hello world." ] [ "localhost" "port" get <inet> ascii <client> drop stream-contents ] unit-test

View File

@ -23,7 +23,7 @@ io.sockets.secure.unix.debug ;
: client-test ( -- string )
<secure-config> [
"127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop contents
"127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop stream-contents
] with-secure-context ;
[ ] [ [ class name>> write ] server-test ] unit-test

View File

@ -6,7 +6,7 @@ io.encodings.utf8 io kernel arrays strings namespaces ;
[ B{ BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 BIN: 11101111 BIN: 10000000 BIN: 10111111 BIN: 11011111 BIN: 10000000 CHAR: x } ]
[ { BIN: 101111111000000111111 BIN: 1111000000111111 BIN: 11111000000 CHAR: x } >string utf8 [ write ] with-byte-writer ] unit-test
[ { BIN: 101111111000000111111 } t ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> contents dup >array swap string? ] unit-test
[ { BIN: 101111111000000111111 } t ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } utf8 <byte-reader> stream-contents dup >array swap string? ] unit-test
[ B{ 121 120 } 0 ] [
B{ 0 121 120 0 0 0 0 0 0 } binary

View File

@ -75,7 +75,7 @@ CONSTANT: text "Hello world.\nThis is a test."
[ ] [
[
"interactor" get register-self
"interactor" get contents "promise" get fulfill
"interactor" get stream-contents "promise" get fulfill
] in-thread
] unit-test

View File

@ -5,6 +5,6 @@ IN: io.streams.c.tests
[ "hello world" ] [
"hello world" "test.txt" temp-file ascii set-file-contents
"test.txt" temp-file "rb" fopen <c-reader> contents
"test.txt" temp-file "rb" fopen <c-reader> stream-contents
>string
] unit-test

View File

@ -33,7 +33,7 @@ M: object handle-message drop ;
"--pretty=format:%h %an: %s" ,
".." glue ,
] { } make
latin1 [ input-stream get lines ] with-process-reader ;
latin1 [ lines ] with-process-reader ;
: updates ( from to -- lines )
git-log reverse