summaryrefslogtreecommitdiff
path: root/libbio/test/bio-write.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
commit2bc852bda98762d3bc01548bf972e3f1b137fbfb (patch)
tree74831deed3c9057c5fe0cbb8790d220e855bc792 /libbio/test/bio-write.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libbio/test/bio-write.myr')
-rw-r--r--libbio/test/bio-write.myr33
1 files changed, 0 insertions, 33 deletions
diff --git a/libbio/test/bio-write.myr b/libbio/test/bio-write.myr
deleted file mode 100644
index cbe7441..0000000
--- a/libbio/test/bio-write.myr
+++ /dev/null
@@ -1,33 +0,0 @@
-use std
-use bio
-
-const main = {
- var i
- var f
- /* Must be bigger than a bio buffer (ie, > 64k) */
- var buf : byte[64*1024]
-
- match bio.create("tmpout/test-write", bio.Wr, 0o644)
- | `std.Some bio: f = bio
- | `std.None: std.fatal(1, "Unable to open data file")
- ;;
-
- /* write a 5 byte chunk */
- bio.write(f, "test\n")
-
- /* again */
- bio.write(f, "test\n")
-
- /* write a 64k chunk */
- for i = 0; i < 64*1024; i++
- buf[i] = 0x31
- ;;
- bio.write(f, buf[:])
-
- /* final message after a big burst */
- bio.write(f, "goodbye\n")
- bio.flush(f)
-
- /* and test for flush on close */
- bio.close(f);
-}