]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
di/trigraph testcase
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 29 Oct 2012 13:36:05 +0000 (14:36 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 29 Oct 2012 13:36:05 +0000 (14:36 +0100)
testsuite/Makefile
testsuite/ngraphs/expected [new file with mode: 0644]
testsuite/ngraphs/main.qc [new file with mode: 0644]

index 910e598e2c1612af7644f0983c046890e41039b3..669ba57c14b14ed75b123e6a89ca9828f705be18 100644 (file)
@@ -13,7 +13,8 @@ TESTLIST = \
        maths2     \
        equality   \
        fields1    \
-       invalid-types
+       invalid-types \
+       ngraphs
 
 .PHONY: clean test
 
@@ -142,6 +143,11 @@ invalid-types-ok: obj invalid-types/assign.qc invalid-types/op.qc invalid-types/
 
 invalid-types: invalid-types-ok
 
+$(eval $(call maketest,ngraphs,qcc))
+ngraphs:
+       @$(VM) $< > $@/output
+       @diff $@/output $@/expected
+
 #######################################################################
 obj:
        mkdir obj
diff --git a/testsuite/ngraphs/expected b/testsuite/ngraphs/expected
new file mode 100644 (file)
index 0000000..81a5e67
--- /dev/null
@@ -0,0 +1,2 @@
+#^[]|{}~\
+#^[]|{}~\
diff --git a/testsuite/ngraphs/main.qc b/testsuite/ngraphs/main.qc
new file mode 100644 (file)
index 0000000..75cbd75
--- /dev/null
@@ -0,0 +1,6 @@
+void(string, string) print = #1;
+
+void() main = {
+       print("??=??'??(??)??!??<??>??-??/??/", "??/n");
+       print("#^[]|{}~\\", "\n");
+};