diff options
Diffstat (limited to 'lib/bio/test/bio-create.myr')
-rw-r--r-- | lib/bio/test/bio-create.myr | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/bio/test/bio-create.myr b/lib/bio/test/bio-create.myr new file mode 100644 index 0000000..6954e32 --- /dev/null +++ b/lib/bio/test/bio-create.myr @@ -0,0 +1,13 @@ +use std +use bio + +const main = { + var f + + std.mkdir("tmpout", 0o755); + match bio.create("tmpout/test-create", bio.Wr, 0o644) + | `std.Some bio: f = bio + | `std.None: std.fatal(1, "Failed to open file\n") + ;; + bio.close(f) +} |