summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorandrewc <andrewchamberss@gmail.com>2016-10-28 16:48:15 +1300
committerAndrew Chambers <andrewchamberss@gmail.com>2016-10-28 19:43:46 +1300
commit96aa84cdbe397910f532f8c802c8de9825e49c59 (patch)
tree6dae3bae3b0fb66435a7ce8e7cee47815e1227d7 /test
parentd0ffb958c7247028223c7e53253249d52a47a324 (diff)
downloadmc-96aa84cdbe397910f532f8c802c8de9825e49c59.tar.gz
merge consecutive string literals
Diffstat (limited to 'test')
-rw-r--r--test/multistr.myr13
-rw-r--r--test/tests1
2 files changed, 14 insertions, 0 deletions
diff --git a/test/multistr.myr b/test/multistr.myr
new file mode 100644
index 0000000..e111adf
--- /dev/null
+++ b/test/multistr.myr
@@ -0,0 +1,13 @@
+use std
+
+const main = {
+ var multi
+
+ multi = "abc" "def" \
+ "ghi"
+
+ match multi
+ | "abcdefghi":
+ | fail: std.fatal("failed: {}\n", fail)
+ ;;
+}
diff --git a/test/tests b/test/tests
index 75a0c0e..2b509bb 100644
--- a/test/tests
+++ b/test/tests
@@ -81,6 +81,7 @@ B mandelbrot C
B log-and E 0
B log-or E 1
B str E 102
+B multistr E 0
B generic E 42
B genericval E 42
B trait-builtin E 42