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/libremakepkg-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/libremakepkg-test.sh')
-rw-r--r-- | test/libremakepkg-test.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index be19e17..2fb7f2f 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -47,7 +47,7 @@ it_displays_help_as_normal_user() { LANG=C libremakepkg -h >$tmpdir/stdout 2>$tmpdir/stderr [[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]] - [[ -z "$(cat $tmpdir/stderr)" ]] + empty $tmpdir/stderr } it_otherwise_fails_as_normal_user() { @@ -58,6 +58,6 @@ it_otherwise_fails_as_normal_user() { libremakepkg >$tmpdir/stdout 2>$tmpdir/stderr || stat=$? [[ $stat != 0 ]] - [[ -z "$(cat $tmpdir/stdout)" ]] - [[ -n "$(cat $tmpdir/stderr)" ]] + empty $tmpdir/stdout + ! empty $tmpdir/stderr } |