1
0
mirror of https://github.com/sstephenson/bats.git synced 2026-02-25 17:28:11 +01:00

Invoke bats with multiple files to run an ad-hoc suite

This commit is contained in:
Sam Stephenson
2013-10-18 14:13:00 -05:00
parent bc72b85871
commit 672f6e4be2
2 changed files with 27 additions and 9 deletions

9
test/suite.bats Normal file → Executable file
View File

@@ -41,3 +41,12 @@ fixtures suite
[ ${lines[0]} = "1..3" ]
echo "$output" | grep "^not ok . quasi-truth"
}
@test "running an ad-hoc suite by specifying multiple test files" {
run bats "$FIXTURE_ROOT/multiple/a.bats" "$FIXTURE_ROOT/multiple/b.bats"
[ $status -eq 0 ]
[ ${lines[0]} = "1..3" ]
echo "$output" | grep "^ok . truth"
echo "$output" | grep "^ok . more truth"
echo "$output" | grep "^ok . quasi-truth"
}