1 USING: accessors alien.c-types alien.data destructors io
2 io.encodings.ascii io.encodings.binary io.encodings.string
3 io.encodings.utf8 io.files io.pipes io.sockets kernel libc
4 locals math namespaces sequences tools.test ;
6 ! Make sure that writing malloced storage to a file works, and
7 ! also make sure that writes larger than the buffer size work
16 100,000 int malloc-array &free [ copy ] keep write
23 100,000 4 * read int cast-array 100,000 iota sequence=
29 ! Getting the stream-element-type of an output-port was broken
30 { +byte+ } [ binary <pipe> [ stream-element-type ] with-disposal ] unit-test
31 { +byte+ } [ binary <pipe> [ out>> stream-element-type ] with-disposal ] unit-test
32 { +character+ } [ ascii <pipe> [ stream-element-type ] with-disposal ] unit-test
33 { +character+ } [ ascii <pipe> [ out>> stream-element-type ] with-disposal ] unit-test
35 ! Issue #1256 regression test
36 ! Port length would be zero before data is received
38 "google.com" 80 <inet> binary [
39 "GET /\n" utf8 encode write flush
40 input-stream get stream-contents