From 498c0ecd82c86a3dbbcc1574d44a5179f3409073 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Thu, 11 Jul 2024 14:33:02 -0400 Subject: [PATCH] looks like the bats bump broke one golden test --- bats | 1 - bin/run.sh | 9 +++++++++ tests/data/missing_script/expected_results.json | 4 ++++ tests/tests.bats | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) delete mode 160000 bats diff --git a/bats b/bats deleted file mode 160000 index c706d14..0000000 --- a/bats +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c706d1470dd1376687776bbe985ac22d09780327 diff --git a/bin/run.sh b/bin/run.sh index 804192e..53b1bd0 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -18,6 +18,15 @@ INTERFACE_VERSION=2 main() { + if (($# != 3)) || [[ $1 == '-h' ]]; then + echo "usage: $0 " + echo "" + echo "Typically, solution_directory == output_directory" + echo "example:" + echo "\$ $0 one_passing ./tests/data/one_passing{,}" + exit + fi + echo "Running exercise tests for Bash" local slug="$1" diff --git a/tests/data/missing_script/expected_results.json b/tests/data/missing_script/expected_results.json index b126064..e3ecd47 100644 --- a/tests/data/missing_script/expected_results.json +++ b/tests/data/missing_script/expected_results.json @@ -1,6 +1,10 @@ { "version": 2, "status": "fail", + "test-environment": { + "bash": "5.2.21(1)-release", + "bats": "Bats 1.5.0" + }, "tests": [ { "name": "say hello", diff --git a/tests/tests.bats b/tests/tests.bats index b3c656c..572ad7f 100644 --- a/tests/tests.bats +++ b/tests/tests.bats @@ -68,7 +68,7 @@ actual_matches_expected() { TEST_DIR="$DATA_DIR/$TEST" run "$RUN_SCRIPT" "$TEST" "$TEST_DIR" "$TEST_DIR" - [[ "$status" -eq 0 ]] + [[ "$status" -ne 0 ]] actual_matches_expected "$TEST_DIR/results.json" "$TEST_DIR/expected_results.json" }