Skip to content

Commit

Permalink
looks like the bats bump broke one golden test
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Jul 11, 2024
1 parent 3dfd80d commit 498c0ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion bats
Submodule bats deleted from c706d1
9 changes: 9 additions & 0 deletions bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
INTERFACE_VERSION=2

main() {
if (($# != 3)) || [[ $1 == '-h' ]]; then
echo "usage: $0 <exercise_slug> <solution_directory> <output_directory>"
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"
Expand Down
4 changes: 4 additions & 0 deletions tests/data/missing_script/expected_results.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit 498c0ec

Please sign in to comment.