diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-23 16:14:51 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-03-23 16:14:51 +0200 |
| commit | 5b038666c3e911ffeb78a4d656044e5bd076705b (patch) | |
| tree | 9b09b4f27c39ef6a0139a5eb9bfa5e98a250086c /tests/check.sh | |
| parent | 70615379062cdd2e016f5095dfafd23a6dca148c (diff) | |
| download | ek-5b038666c3e911ffeb78a4d656044e5bd076705b.tar.gz ek-5b038666c3e911ffeb78a4d656044e5bd076705b.zip | |
integrate parser work
Diffstat (limited to 'tests/check.sh')
| -rwxr-xr-x | tests/check.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/check.sh b/tests/check.sh new file mode 100755 index 0000000..397d36d --- /dev/null +++ b/tests/check.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +echo > check.log + +tests=0 +passed=0 +failed=0 + +for file in $(echo check/*.cu) +do + testcase=$(echo "$file" | cut -f 1 -d '.') + expected="$testcase".ok + args=$(test -e "$testcase".args && cat "$testcase".args) + + echo -n testing "$testcase"... + + cmd="./cu "$args" "$file" -o check/run && ./check/run" + + tests=$((tests + 1)) + if test "$output" = "$expected" + then + passed=$((passed + 1)) + echo ok + else + failed=$((failed + 1)) + echo fail + fi; + + if test -n "$VERBOSE" + then + echo "$cmd" + fi +done + +echo +echo tests "$tests", passed "$passed", failed "$failed" |
