From 3497e4c081ccb854a674bb84324671ea7733b72b Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Thu, 31 Dec 2015 13:55:51 +0100 Subject: Add test for md5sum fail. See #23 --- t/fail.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/fail.t b/t/fail.t index 8e61c7a..6cda040 100755 --- a/t/fail.t +++ b/t/fail.t @@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib"; use Test::Execute; if ($ENV{TEST_INSTALL}) { - plan tests => 3; + plan tests => 4; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -67,14 +67,15 @@ set_lo(); # 1: Failing slackbuild script script (qw/ sboinstall failingslackbuild /, { input => "y\ny", expected => qr/Failures:\n failingslackbuild: failingslackbuild.SlackBuild return non-zero\n\z/, exit => 3 }); -# 2: Failing download +# 2-3: Failing download and md5sum SKIP: { skip "Not doing online tests", 1 unless $ENV{TEST_ONLINE}; script (qw/ sboinstall failingdownload /, { input => "y\ny\nn", expected => qr!Failures:\n failingdownload: Unable to wget http://www[.]pastemobile[.]org/perf[.]dummy[.]fail[.]\n!, exit => 5 }); + script (qw/ sboinstall failingmd5sum /, { input => "y\ny\nn", expected => qr!Failures:\n failingmd5sum: md5sum failure for /usr/sbo/distfiles/perf[.]dummy[.]\n!, exit => 4 }); } -# 3: Failing dependency +# 4: Failing dependency script (qw/ sboinstall nonexistentslackbuild2 /, { input => "y\ny\ny\nn", expected => qr/Failures:\n failingslackbuild: failingslackbuild.SlackBuild return non-zero\n/, exit => 3 }); # Cleanup -- cgit v1.2.3