]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Test preprocessor options
authorfennecdjay <fennecdjay@gwion.tk>
Fri, 13 Nov 2020 13:05:15 +0000 (14:05 +0100)
committerfennecdjay <fennecdjay@gwion.tk>
Fri, 13 Nov 2020 13:05:15 +0000 (14:05 +0100)
tests/sh/opt.sh

index 4cf3e21dca5428d7002aa94f7e1b2dfe6bc6fcc3..1c86d66a8b0eb64bbf3caf566a57f285594da5a0 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# [test] #21
+# [test] #24
 
 n=0
 [ "$1" ] && n="$1"
@@ -90,10 +90,22 @@ run "$n" "invalid global type" "examples/complex/invalid_type0.gw examples/compl
 n=$((n+1))
 run "$n" "invalid global func" "examples/complex/invalid_func0.gw examples/complex/invalid_func1.gw" "file"
 
-# comma in module argument
+# comma in module argument, uses the now deprecated -mpp
 n=$((n+1))
 run "$n" "comma in module argument" "-mpp=-Dtest='\"dqs\,qs\"',-Dtsdl" "file"
 
+# define
+n=$((n+1))
+run "$n" "define" "-Dtest(a)=#a" "file"
+
+# undef
+n=$((n+1))
+run "$n" "undef" "-Utest" "nofile"
+
+# include path
+n=$((n+1))
+run "$n" "include path" "-I../Gwion" "file"
+
 # test signal
 # mask asan output for now
 ./gwion -l1 &>/dev/null &