summaryrefslogtreecommitdiff
path: root/test/stdopt-mk.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-09-23 17:24:54 -0400
committerOri Bernstein <ori@eigenstate.org>2013-09-23 17:24:54 -0400
commitb79e739ffcf4a2d7c6c177a257c63a24c7bc844f (patch)
tree5408551b82ddbf1c0acbf86167f43adf5c0020fc /test/stdopt-mk.myr
parent4c4a81a00c9265c4279f9442564c37f30df3fd63 (diff)
downloadmc-b79e739ffcf4a2d7c6c177a257c63a24c7bc844f.tar.gz
Some renaming and test addition.
Diffstat (limited to 'test/stdopt-mk.myr')
-rw-r--r--test/stdopt-mk.myr15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/stdopt-mk.myr b/test/stdopt-mk.myr
new file mode 100644
index 0000000..028956a
--- /dev/null
+++ b/test/stdopt-mk.myr
@@ -0,0 +1,15 @@
+use std
+
+const main = {args : byte[:][:]
+ match getoption(123)
+ `std.Some val: std.put("Got a value: %i\n", val);;
+ `std.None: std.put("No value returned\n");;
+ ;;
+}
+
+const getoption = {val
+ match val
+ 0: -> `std.None;;
+ _: -> `std.Some val;;
+ ;;
+}