diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-30 12:06:49 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-30 12:07:44 -0400 |
commit | 505cf3ea3c09b390a57c715e47b65fea764d726d (patch) | |
tree | 1d6410c460e2df89fe64fe45e11df9dbbffbf647 /test/lib-messages-test.sh | |
parent | 3473a80a47f2cadc729f3be05fa7485ae5b12e22 (diff) |
test-common.sh: add an empty() routine to check if a file is empty, use it
Diffstat (limited to 'test/lib-messages-test.sh')
-rw-r--r-- | test/lib-messages-test.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lib-messages-test.sh b/test/lib-messages-test.sh index 826556b..fffff36 100644 --- a/test/lib-messages-test.sh +++ b/test/lib-messages-test.sh @@ -30,15 +30,15 @@ it_works_with_no_color_and_set_euE() ( msg Foo ) >$tmpdir/stdout 2>$tmpdir/stderr - [[ -z "$(cat $tmpdir/stdout)" ]] - [[ -n "$(cat $tmpdir/stderr)" ]] + empty $tmpdir/stdout + ! empty $tmpdir/stderr ) it_can_be_called_without_including() { libremessages msg Foo >$tmpdir/stdout 2>$tmpdir/stderr - [[ -z "$(cat $tmpdir/stdout)" ]] - [[ -n "$(cat $tmpdir/stderr)" ]] + empty $tmpdir/stdout + ! empty $tmpdir/stderr } it_fails_with_msg_and_no_args() { |