diff options
author | kdx <kikoodx@paranoici.org> | 2023-06-12 19:52:17 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-06-12 19:52:17 +0200 |
commit | 7648643b7f25b7752aacef9e758cf28372529ab4 (patch) | |
tree | a0630cfb6358ba50005f309b4a76fa60f9000f58 /testing.sh | |
parent | 77c272bf67beb30997021947ff8d7fc5cef7b637 (diff) | |
download | golem-7648643b7f25b7752aacef9e758cf28372529ab4.tar.gz |
postfix operators are gucci
Diffstat (limited to 'testing.sh')
-rwxr-xr-x | testing.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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.* |