summaryrefslogtreecommitdiff
path: root/testing.sh
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-06-12 19:52:17 +0200
committerkdx <kikoodx@paranoici.org>2023-06-12 19:52:17 +0200
commit7648643b7f25b7752aacef9e758cf28372529ab4 (patch)
treea0630cfb6358ba50005f309b4a76fa60f9000f58 /testing.sh
parent77c272bf67beb30997021947ff8d7fc5cef7b637 (diff)
downloadgolem-7648643b7f25b7752aacef9e758cf28372529ab4.tar.gz
postfix operators are gucci
Diffstat (limited to 'testing.sh')
-rwxr-xr-xtesting.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/testing.sh b/testing.sh
index 6db3877..b34667e 100755
--- a/testing.sh
+++ b/testing.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-function test() {
+test() {
QUIET="$1"
CODE="$2"
echo "--- $CODE ---"
@@ -52,4 +52,7 @@ test "$1" "main() { local a; dbg a; inc(&a); dbg a; } inc(p) { [p] = [p] + 1; }"
test "$1" "global a; main() { dbg a; inc(&a); dbg a; } inc(p) { [p] = [p] + 1; }"
test "$1" "main() 0; //ayayayayayayaya comment"
test "$1" "main() return;"
+test "$1" "main() { local a; a = 5; dbg a; a++; dbg a; }"
+test "$1" "main() { local a; a = 5; dbg a; a--; dbg a; }"
+exit
rm -f build/tmp.*