Skip to content

Commit

Permalink
Fix test failure on windows
Browse files Browse the repository at this point in the history
Using the script itself as formatter executes the file with bats again and adds --dummy-flag as formatter flag.
  • Loading branch information
martin-schulze-vireso committed Jun 5, 2022
1 parent 2373ff7 commit cea8b34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/formatter.bats
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ EOF

@test "specifying non executable external formatter is an error" {
bats_require_minimum_version 1.5.0
run -1 bats "$FIXTURE_ROOT/passing.bats" --formatter "$BATS_TEST_FILENAME"
[ "$output" = "ERROR: Formatter '$BATS_TEST_FILENAME' is not executable!" ]
local non_executable="$BATS_TEST_TMPDIR/non-executable"
touch "$non_executable"
run -1 bats "$FIXTURE_ROOT/passing.bats" --formatter "$non_executable"
[ "$output" = "ERROR: Formatter '$non_executable' is not executable!" ]
}

0 comments on commit cea8b34

Please sign in to comment.