summaryrefslogtreecommitdiff
path: root/test/librelib-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/librelib-test.sh')
-rw-r--r--test/librelib-test.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/librelib-test.sh b/test/librelib-test.sh
index e86dffe..23c38dc 100644
--- a/test/librelib-test.sh
+++ b/test/librelib-test.sh
@@ -16,7 +16,7 @@ it_displays_help_and_fails_with_0_args() {
ret=0
librelib >$tmpdir/stdout 2>$tmpdir/stderr || ret=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
+ empty $tmpdir/stdout
[[ "$(sed 1q $tmpdir/stderr)" =~ Usage:.* ]]
[[ $ret != 0 ]]
}
@@ -25,8 +25,8 @@ it_fails_with_2_args() {
ret=0
librelib a b >$tmpdir/stdout 2>$tmpdir/stderr || ret=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $ret != 0 ]]
}
@@ -34,7 +34,7 @@ it_displays_usage_text() {
librelib -h >$tmpdir/stdout 2>$tmpdir/stderr
[[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
- [[ -z "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stderr
}
# libremessages is executable
@@ -67,7 +67,7 @@ it_fails_to_find_phony() {
ret=0
librelib phony >$tmpdir/stdout 2>$tmpdir/stderr || ret=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $ret != 0 ]]
}