diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-25 07:38:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-25 07:38:42 -0700 |
commit | b73c9b0a964ae6f2e3af5e597d7f98244f552efb (patch) | |
tree | d8413a4f9b935488fe3f0c829f1b7704ab884305 /testsuite.cwk | |
parent | 595b367f6fd2d09e1489389ba999f73915309b5c (diff) | |
download | cppawk-b73c9b0a964ae6f2e3af5e597d7f98244f552efb.tar.gz cppawk-b73c9b0a964ae6f2e3af5e597d7f98244f552efb.tar.bz2 cppawk-b73c9b0a964ae6f2e3af5e597d7f98244f552efb.zip |
Use awk for testsuite rather than cppawk.
There are ways in which cppawk can be fundamentally broken
which will cause the test suite to appear to succeed, but
without actually running any tests.
Diffstat (limited to 'testsuite.cwk')
-rwxr-xr-x | testsuite.cwk | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/testsuite.cwk b/testsuite.cwk deleted file mode 100755 index c70788c..0000000 --- a/testsuite.cwk +++ /dev/null @@ -1,32 +0,0 @@ -#!./cppawk -f - -BEGIN { - RS = "--\n" - FS = ":\n" -} - -function runtest(id, code, output, - failed) -{ - print code > "script.sh" - print output > "output" - - failed = 0 - - if (output == "ERR\n") { - if (system("sh script.sh > /dev/null 2>&1") == 0) - failed = 1 - } else if (system("[ \"$(sh script.sh)\" = \"$(cat output)\" ]") != 0) { - failed = 1 - } - - if (failed) - printf("test %s failed (for cppawk = %s)\n", id, ENVIRON["cppawk"]) - - close("script.sh") - close("output") -} - -$1 { - runtest($1, $2, $3) -} |