summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-23 23:29:24 -0700
committerOri Bernstein <ori@eigenstate.org>2015-11-06 00:38:56 -0800
commit650b63c3d3fbf7935cfc3db0da322b49b02f0388 (patch)
tree23568dd63fab88b80daad55cdbf5e08da2d1c40d /test
parent26e54d3c7cbaab5efa5e63a32b87b49328fd5f6b (diff)
downloadmc-650b63c3d3fbf7935cfc3db0da322b49b02f0388.tar.gz
Working pattern matching.
Diffstat (limited to 'test')
-rw-r--r--test/matchargstr.myr3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/matchargstr.myr b/test/matchargstr.myr
index 0d8cf4e..527082d 100644
--- a/test/matchargstr.myr
+++ b/test/matchargstr.myr
@@ -14,7 +14,8 @@ const main = {
match v
| `Int 127: std.fatal("wrong match `Int 127\n")
| `Str "foo": std.fatal("Wrong match `Str \"foo\"\n")
- | `Str "fsda": std.fatal("Wrong match `Str \"fsda\"\n")
+ /* make sure we backtrack for the test */
+ | `Str "asfd": std.fatal("Wrong match `Str \"fsda\"\n")
| `Str "asdf": std.put("Correct `Str \"asdf\"!\n")
| `Nil: std.fatal("Wrong match `Str \"fsda\"\n")
| _: std.fatal("Impossible failed match\n")