1
0
mirror of https://github.com/sstephenson/bats.git synced 2026-02-25 09:18:10 +01:00

bats -c filename prints the number of tests in the file

This commit is contained in:
Sam Stephenson
2012-04-08 23:25:19 -05:00
parent 3f82256855
commit 6b965e18c4
3 changed files with 30 additions and 3 deletions

View File

@@ -86,3 +86,13 @@ teardown() {
[ "${lines[5]}" = " failure stdout 2" ]
[ "${lines[7]}" = " failure stderr" ]
}
@test "-c prints the number of tests" {
run bats -c "$FIXTURE_ROOT/empty.bats"
[ $status -eq 0 ]
[ "$output" = "0" ]
run bats -c "$FIXTURE_ROOT/output.bats"
[ $status -eq 0 ]
[ "$output" = "4" ]
}