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

fixed the test to read a little better

use a subshell to test the grep for DEBUG.
This commit is contained in:
Spike Grobstein 2013-08-31 13:48:01 -04:00
parent 93d6a43dae
commit 1fc2de8b43

View File

@ -112,9 +112,14 @@ fixtures bats
}
@test "test should not output DEBUG line if DEBUG is not set" {
export DEBUG=1
run bats "$FIXTURE_ROOT/debug.bats"
[ $status -eq 0 ]
[[ ! $(echo $output | grep DEBUG) ]]
# [[ ! $(echo $output | grep DEBUG) ]]
echo $output | {
run grep DEBUG
[[ $status -ne 0 ]]
}
}
@test "test should output DEBUG line if DEBUG is set" {