shithub: mc

Download patch

ref: 06910883726c34ebc812b86e813d51442157400e
parent: 56ddddaa8ea95295ebd7743a1c828f0365bf7bb8
author: Ori Bernstein <[email protected]>
date: Sat Jun 30 10:00:58 EDT 2012

Add const matching test, fix up test script.

binary files a/test/matchconst /dev/null differ
--- /dev/null
+++ b/test/matchconst.myr
@@ -1,0 +1,18 @@
+/* some misc constants */
+const Ca = 123
+const Cb = 8
+const Cc = 42
+
+const main = {
+	var v
+
+	v = 8
+	match v
+	Ca: 	-> 123
+		;;
+	Cb:	-> 88
+		;;
+	Cc:	-> 42
+		;;
+	;;
+}
--- a/test/test.sh
+++ b/test/test.sh
@@ -5,13 +5,13 @@
 export CC=cc
 
 function use {
-    rm -f $1
+    rm -f $1 $1.o $1.s $1.use
     echo $MU $1.myr -o $1.use && \
     $MU $1.myr -o $1.use
 }
 
 function build {
-    rm -f $1
+    rm -f $1 $1.o $1.s $1.use
     echo $MC $1.myr && \
     $MC $1.myr && \
     $CC -g -m32 -o $1 $1.o