summaryrefslogtreecommitdiff
path: root/test/lib-blacklist-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib-blacklist-test.sh')
-rw-r--r--test/lib-blacklist-test.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/lib-blacklist-test.sh b/test/lib-blacklist-test.sh
index c496167..c77e5ea 100644
--- a/test/lib-blacklist-test.sh
+++ b/test/lib-blacklist-test.sh
@@ -52,8 +52,8 @@ it_fails_update_when_there_is_no_blacklist_or_network() {
libreblacklist update >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
}
it_fails_cat_when_there_is_no_blacklist_or_network() {
@@ -63,8 +63,8 @@ it_fails_cat_when_there_is_no_blacklist_or_network() {
libreblacklist cat >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
}
it_fails_update_when_BLACKLIST_is_unset() {
@@ -74,8 +74,8 @@ it_fails_update_when_BLACKLIST_is_unset() {
libreblacklist update >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
}
it_fails_cat_when_syntax_error_in_conf() {
@@ -86,8 +86,8 @@ it_fails_cat_when_syntax_error_in_conf() {
libreblacklist cat >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
- [[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stdout
+ ! empty $tmpdir/stderr
}
it_downloads_the_blacklist_as_needed() {
@@ -97,7 +97,7 @@ it_downloads_the_blacklist_as_needed() {
libreblacklist cat >$tmpdir/stdout 2>$tmpdir/stderr
- [[ -n "$(cat $tmpdir/stdout)" ]]
+ ! empty $tmpdir/stdout
}
it_downloads_the_blacklist_repeatedly() {
@@ -113,7 +113,7 @@ it_displays_help_and_fails_with_no_args() {
LANG=C libreblacklist >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
- [[ -z "$(cat $tmpdir/stdout)" ]]
+ empty $tmpdir/stdout
[[ "$(sed 1q $tmpdir/stderr)" =~ 'Usage: libreblacklist ' ]]
}
@@ -121,12 +121,12 @@ it_displays_help_when_given_h() {
LANG=C libreblacklist -h >$tmpdir/stdout 2>$tmpdir/stderr
[[ "$(sed 1q $tmpdir/stdout)" =~ 'Usage: libreblacklist ' ]]
- [[ -z "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stderr
}
it_displays_help_when_given_h_cat() {
LANG=C libreblacklist -h cat >$tmpdir/stdout 2>$tmpdir/stderr
[[ "$(sed 1q $tmpdir/stdout)" == 'Usage: libreblacklist cat' ]]
- [[ -z "$(cat $tmpdir/stderr)" ]]
+ empty $tmpdir/stderr
}