1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-11-17 19:52:37 +01:00

Fix test failures due to unquoted variables

The four test cases updated in this commit were failing on my Windows
virtual machine because my username contains a space. Quoting the file
paths containing "$FIXTURE_ROOT" solved the problem.
This commit is contained in:
Mike Bland 2017-09-28 06:34:03 -04:00
parent 8c4a86d534
commit ebb192e036
No known key found for this signature in database
GPG Key ID: 5121C73A6E07384B

View File

@ -41,25 +41,25 @@ fixtures bats
} }
@test "summary passing tests" { @test "summary passing tests" {
run filter_control_sequences bats -p $FIXTURE_ROOT/passing.bats run filter_control_sequences bats -p "$FIXTURE_ROOT/passing.bats"
[ $status -eq 0 ] [ $status -eq 0 ]
[ "${lines[1]}" = "1 test, 0 failures" ] [ "${lines[1]}" = "1 test, 0 failures" ]
} }
@test "summary passing and skipping tests" { @test "summary passing and skipping tests" {
run filter_control_sequences bats -p $FIXTURE_ROOT/passing_and_skipping.bats run filter_control_sequences bats -p "$FIXTURE_ROOT/passing_and_skipping.bats"
[ $status -eq 0 ] [ $status -eq 0 ]
[ "${lines[2]}" = "2 tests, 0 failures, 1 skipped" ] [ "${lines[2]}" = "2 tests, 0 failures, 1 skipped" ]
} }
@test "summary passing and failing tests" { @test "summary passing and failing tests" {
run filter_control_sequences bats -p $FIXTURE_ROOT/failing_and_passing.bats run filter_control_sequences bats -p "$FIXTURE_ROOT/failing_and_passing.bats"
[ $status -eq 0 ] [ $status -eq 0 ]
[ "${lines[4]}" = "2 tests, 1 failure" ] [ "${lines[4]}" = "2 tests, 1 failure" ]
} }
@test "summary passing, failing and skipping tests" { @test "summary passing, failing and skipping tests" {
run filter_control_sequences bats -p $FIXTURE_ROOT/passing_failing_and_skipping.bats run filter_control_sequences bats -p "$FIXTURE_ROOT/passing_failing_and_skipping.bats"
[ $status -eq 0 ] [ $status -eq 0 ]
[ "${lines[5]}" = "3 tests, 1 failure, 1 skipped" ] [ "${lines[5]}" = "3 tests, 1 failure, 1 skipped" ]
} }