diff options
author | Jason Karns <jason@karns.name> | 2018-11-27 18:58:18 +0300 |
---|---|---|
committer | Jason Karns <jason@karns.name> | 2018-11-27 18:58:18 +0300 |
commit | d9a59d1e96da2573710cfa4d62377a5b1a1e792f (patch) | |
tree | ea1f6c3a93530d371a8a074daf052b10a0db1f2c | |
parent | 45d5b1e921bb5997d01704aef7ec999e60bfd0b1 (diff) |
move quiet_exit assertion to test_helper
-rwxr-xr-x | test/50-assert-15-assert_output.bats | 5 | ||||
-rw-r--r-- | test/test_helper.bash | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/50-assert-15-assert_output.bats b/test/50-assert-15-assert_output.bats index 6506267..0779a1c 100755 --- a/test/50-assert-15-assert_output.bats +++ b/test/50-assert-15-assert_output.bats @@ -2,11 +2,6 @@ load test_helper -assert_quiet_exit() { - [ "$status" -eq 0 ] - [ "${#lines[@]}" -eq 0 ] -} - # # Literal matching # diff --git a/test/test_helper.bash b/test/test_helper.bash index 32ad846..b5728e5 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -7,4 +7,9 @@ setup() { # Load library. load '../load' + + assert_quiet_exit() { + test "$status" -eq 0 + test "${#lines[@]}" -eq 0 + } } |