1 USING: destructors io io.directories io.encodings.binary
2 io.files io.files.temp kernel libc math sequences
3 specialized-arrays.instances.alien.c-types.int 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
10 "test.txt" temp-file binary [
14 100,000 malloc-int-array &free [ copy ] keep write
20 "test.txt" temp-file binary [
21 100,000 4 * read byte-array>int-array 100,000 iota sequence=
25 [ ] [ "test.txt" temp-file delete-file ] unit-test