summaryrefslogtreecommitdiff
path: root/lib/bio/test/bio-unitwr.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio/test/bio-unitwr.myr')
-rw-r--r--lib/bio/test/bio-unitwr.myr14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/bio/test/bio-unitwr.myr b/lib/bio/test/bio-unitwr.myr
new file mode 100644
index 0000000..8a1774c
--- /dev/null
+++ b/lib/bio/test/bio-unitwr.myr
@@ -0,0 +1,14 @@
+use std
+use bio
+
+const main = {
+ var f
+ match bio.create("tmpout/test-unitwr", bio.Wr, 0o644)
+ | `std.Some bio: f = bio
+ | `std.None: std.fatal(1, "Unable to open data file")
+ ;;
+ bio.putb(f, 42)
+ bio.putc(f, 'ה')
+ bio.putb(f, 0xa)
+ bio.close(f);
+}