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