diff options
author | Brian Cully <bjc@kublai.com> | 2022-06-12 10:36:03 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-06-12 10:36:03 -0400 |
commit | 7f870a8a33ed05bd74cfde1f8206f660ce121637 (patch) | |
tree | 030ad8f5d9f894a9b8931384c41dca462b244695 /t/lib.t | |
parent | 2a85a35687ee87161fe4c936856ec0f45cb0e058 (diff) | |
download | spamcat-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/lib.t')
-rw-r--r-- | t/lib.t | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 { |