summaryrefslogtreecommitdiff
path: root/test/test-common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-common.sh')
-rw-r--r--test/test-common.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test-common.sh b/test/test-common.sh
index 01b1b35..4e528d5 100644
--- a/test/test-common.sh
+++ b/test/test-common.sh
@@ -22,7 +22,8 @@ _after_sudo() {
fi
}
-require() {
+require() (
+ set +x
local missing=()
if libremessages in_array "network" "$@" && ! [[ $NETWORK ]]; then
missing+=('networking')
@@ -35,4 +36,9 @@ require() {
return 1
fi
return 0;
-}
+)
+
+empty() (
+ set +x
+ [[ $(stat -c %s "$1") -eq 0 ]]
+)