summaryrefslogtreecommitdiff
path: root/test/pkgbuild-check-nonfree-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/pkgbuild-check-nonfree-test.sh')
-rw-r--r--test/pkgbuild-check-nonfree-test.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/pkgbuild-check-nonfree-test.sh b/test/pkgbuild-check-nonfree-test.sh
index d547e24..80bfc47 100644
--- a/test/pkgbuild-check-nonfree-test.sh
+++ b/test/pkgbuild-check-nonfree-test.sh
@@ -30,31 +30,31 @@ it_displays_usage_text() {
stat=$?
[[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]]
- [[ -z "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stderr
[[ $stat == 0 ]]
}
it_succeeds_for_free_depends() {
$pcn $pcn.d/PKGBUILD.free >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $stat == 0 ]]
}
it_succeeds_for_nonfree_depend_with_replacement() {
$pcn $pcn.d/PKGBUILD.nonfree-replacement >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $stat == 0 ]]
}
it_fails_with_15_for_nonfree_depend() {
$pcn $pcn.d/PKGBUILD.nonfree >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $stat == 15 ]]
}
@@ -65,7 +65,7 @@ it_fails_when_there_is_no_blacklist() {
$pcn $pcn.d/PKGBUILD.free >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
[[ $stat != 0 ]] && [[ $stat != 15 ]]
}