 
 { 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
-


! pipes are duplex and not seekable
[ "as" ] [
    latin1 <pipe> [ 2 <limited-stream> ] change-in
    "asdf" over stream-write dup stream-flush
    2 swap stream-read
] unit-test

[ "as" ] [
    latin1 <pipe> [ 2 <limited-stream> ] change-in
    "asdf" over stream-write dup stream-flush
    3 swap stream-read
] unit-test

! test seeking on limited unseekable streams
[ "as" ] [
    latin1 <pipe> [ 2 <limited-stream> ] change-in
    "asdf" over stream-write dup stream-flush
    2 swap stream-read
] unit-test

[ "as" ] [
    latin1 <pipe> [ 2 <limited-stream> ] change-in
    "asdf" over stream-write dup stream-flush
    3 swap stream-read
] unit-test

[ t ]

USING: accessors continuations destructors io io.encodings
io.encodings.ascii io.encodings.binary
io.encodings.string io.encodings.utf8 io.files io.pipes
io.streams.byte-array io.streams.duplex io.streams.limited io.streams.string
kernel namespaces strings tools.test system
io.encodings.8-bit.latin1 ;
IN: io.streams.limited.tests
