fix unit tests that call lines or contents
parent
2dc29fe831
commit
ce7ad9a42d
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -26,4 +26,4 @@ io.encodings.utf8 io kernel arrays strings namespaces ;
|
|||
0 seek-end input-stream get stream-seek
|
||||
read1
|
||||
] with-byte-reader
|
||||
] unit-test
|
||||
] unit-test
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -150,4 +150,4 @@ CONSTANT: text "Hello world.\nThis is a test."
|
|||
|
||||
[ ] [ <listener-gadget> "l" set ] unit-test
|
||||
[ ] [ "l" get com-scroll-up ] unit-test
|
||||
[ ] [ "l" get com-scroll-down ] unit-test
|
||||
[ ] [ "l" get com-scroll-down ] unit-test
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue