io.streams.limited.tests: use with-stream in the tests to ensure that the pipes are disposed
parent
13e5edc007
commit
47c16ed078
|
@ -1,7 +1,7 @@
|
||||||
USING: accessors continuations destructors io io.encodings
|
USING: accessors continuations destructors io io.encodings
|
||||||
io.encodings.ascii io.encodings.binary
|
io.encodings.ascii io.encodings.binary
|
||||||
io.encodings.string io.encodings.utf8 io.files io.pipes
|
io.encodings.string io.encodings.utf8 io.files io.pipes
|
||||||
io.streams.byte-array io.streams.limited io.streams.string
|
io.streams.byte-array io.streams.duplex io.streams.limited io.streams.string
|
||||||
kernel namespaces strings tools.test system
|
kernel namespaces strings tools.test system
|
||||||
io.encodings.8-bit.latin1 ;
|
io.encodings.8-bit.latin1 ;
|
||||||
IN: io.streams.limited.tests
|
IN: io.streams.limited.tests
|
||||||
|
@ -56,28 +56,32 @@ IN: io.streams.limited.tests
|
||||||
|
|
||||||
! pipes are duplex and not seekable
|
! pipes are duplex and not seekable
|
||||||
[ "as" ] [
|
[ "as" ] [
|
||||||
latin1 <pipe> [ 2 <limited-stream> ] change-in
|
latin1 <pipe> [
|
||||||
"asdf" over stream-write dup stream-flush
|
input-stream [ 2 <limited-stream> ] change
|
||||||
2 swap stream-read
|
"asdf" write flush 2 read
|
||||||
|
] with-stream
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "as" ] [
|
[ "as" ] [
|
||||||
latin1 <pipe> [ 2 <limited-stream> ] change-in
|
latin1 <pipe> [
|
||||||
"asdf" over stream-write dup stream-flush
|
input-stream [ 2 <limited-stream> ] change
|
||||||
3 swap stream-read
|
"asdf" write flush 3 read
|
||||||
|
] with-stream
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
! test seeking on limited unseekable streams
|
! test seeking on limited unseekable streams
|
||||||
[ "as" ] [
|
[ "as" ] [
|
||||||
latin1 <pipe> [ 2 <limited-stream> ] change-in
|
latin1 <pipe> [
|
||||||
"asdf" over stream-write dup stream-flush
|
input-stream [ 2 <limited-stream> ] change
|
||||||
2 swap stream-read
|
"asdf" write flush 2 read
|
||||||
|
] with-stream
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "as" ] [
|
[ "as" ] [
|
||||||
latin1 <pipe> [ 2 <limited-stream> ] change-in
|
latin1 <pipe> [
|
||||||
"asdf" over stream-write dup stream-flush
|
input-stream [ 2 <limited-stream> ] change
|
||||||
3 swap stream-read
|
"asdf" write flush 3 read
|
||||||
|
] with-stream
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ t ]
|
[ t ]
|
||||||
|
@ -125,4 +129,3 @@ IN: io.streams.limited.tests
|
||||||
|
|
||||||
{ 4 } [ B{ 0 1 2 3 4 5 } binary <byte-reader> 4 <limited-stream> stream-length ] unit-test
|
{ 4 } [ B{ 0 1 2 3 4 5 } binary <byte-reader> 4 <limited-stream> stream-length ] unit-test
|
||||||
{ 6 } [ B{ 0 1 2 3 4 5 } binary <byte-reader> 8 <limited-stream> stream-length ] unit-test
|
{ 6 } [ B{ 0 1 2 3 4 5 } binary <byte-reader> 8 <limited-stream> stream-length ] unit-test
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue