mirror of
https://github.com/sstephenson/bats.git
synced 2026-02-25 09:18:10 +01:00
Fix for test files without trailing newlines (closes #12)
This commit is contained in:
@@ -117,6 +117,12 @@ fixtures bats
|
||||
[ $status -eq 0 ]
|
||||
}
|
||||
|
||||
@test "test file without trailing newline" {
|
||||
run bats "$FIXTURE_ROOT/without_trailing_newline.bats"
|
||||
[ $status -eq 0 ]
|
||||
[ "${lines[1]}" = "ok 1 truth" ]
|
||||
}
|
||||
|
||||
@test "skipped tests" {
|
||||
run bats "$FIXTURE_ROOT/skipped.bats"
|
||||
[ $status -eq 0 ]
|
||||
|
||||
3
test/fixtures/bats/without_trailing_newline.bats
vendored
Normal file
3
test/fixtures/bats/without_trailing_newline.bats
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@test "truth" {
|
||||
true
|
||||
}
|
||||
Reference in New Issue
Block a user