From 66993321af1e67570469a2b9a9731492d0aaff5b Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 7 Oct 2026 19:14:04 +0000 Subject: [de3a009ef3] Write a very basic "hello world" test which verifies that the program outputs the correct message. This fails for now, as the interpreter isn't implemented yet, but it's a good way to start doing test-driven development. FossilOrigin-Name: f34934025a9f22b574c1076b05673b94a4f40d8a55c723fced7c055155042c57 --- tests/run_script_test.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'tests/run_script_test.sh') diff --git a/tests/run_script_test.sh b/tests/run_script_test.sh index a6ccfa8..21c4e04 100755 --- a/tests/run_script_test.sh +++ b/tests/run_script_test.sh @@ -39,13 +39,25 @@ case $expected in ;; esac -"$1" -check $? +if [ -x "$1" ] +then + "$1" + check $? +fi case "$ext" in aplwc) - aplwc "$1" + aplwc -x "$1" check $? + + if [ -f "$1.output" ] + then + aplwc -x "$1" 2>&1 | cmp - "$1.output" + if [ "$?" -ne 0 ] + then + exit 1 + fi + fi ;; esac -- cgit v1.2.3