aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-06-12 10:36:03 -0400
committerBrian Cully <bjc@kublai.com>2022-06-12 10:36:03 -0400
commit7f870a8a33ed05bd74cfde1f8206f660ce121637 (patch)
tree030ad8f5d9f894a9b8931384c41dca462b244695 /t
parent2a85a35687ee87161fe4c936856ec0f45cb0e058 (diff)
downloadspamcat-7f870a8a33ed05bd74cfde1f8206f660ce121637.tar.gz
spamcat-7f870a8a33ed05bd74cfde1f8206f660ce121637.zip
Check return codes from ‘system’ calls.
Abort tests if there’s an error during setup.
Diffstat (limited to 't')
-rw-r--r--t/lib.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/lib.t b/t/lib.t
index 657658e..89f4bb7 100644
--- a/t/lib.t
+++ b/t/lib.t
@@ -13,9 +13,11 @@ BEGIN {
deliver => "t/delivert $tmpdir",
domains => ['spamcat.example.com', 'spamcat2.example.com']);
- system "rm -rf $tmpdir";
+ system("rm -rf $tmpdir") == 0
+ or die "Couldn't remove ‘$tmpdir’: $!\n";
mkdir $tmpdir;
- system "/usr/local/bin/sqlite3 $conf{dbpath} < config/create-tables.sql";
+ system("/usr/local/bin/sqlite3 $conf{dbpath} < config/create-tables.sql") == 0
+ or die "Couldn't create ‘$conf{dbpath}’: $!\n";
}
END {