From 2018bbaec4abf9894fd91107602b55cff1838174 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Thu, 31 Dec 2015 15:40:52 +0100 Subject: Check for the right exitcode. See #23 --- t/fail.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 't/fail.t') diff --git a/t/fail.t b/t/fail.t index 9c8f1c3..f33c4e5 100755 --- a/t/fail.t +++ b/t/fail.t @@ -100,20 +100,20 @@ script (qw/ sboinstall nonexistentslackbuild2 /, { input => "y\ny\ny\nn", expect SKIP: { skip "Not doing online tests", 2 unless $ENV{TEST_ONLINE}; - script (qw/ sboinstall nonexistentslackbuild3 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n failingdownload: Unable to wget http://www[.]pastemobile[.]org/perf[.]dummy[.]fail[.]\n!, exit => 5}); - script (qw/ sboinstall nonexistentslackbuild4 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n failingmd5sum: md5sum failure for /usr/sbo/distfiles/perf[.]dummy[.]\n!, exit => 4}); + script (qw/ sboinstall nonexistentslackbuild3 /, { input => "y\ny\ny\nn", expected => qr!Failures:\n failingdownload: Unable to wget http://www[.]pastemobile[.]org/perf[.]dummy[.]fail[.]\n!, exit => 5 }); + script (qw/ sboinstall nonexistentslackbuild4 /, { input => "y\ny\ny\nn", expected => qr!Failures:\n failingmd5sum: md5sum failure for /usr/sbo/distfiles/perf[.]dummy[.]\n!, exit => 4 }); } # 7: Failing build with working dep -script (qw/ sboinstall failingslackbuild2 /, {input => "y\ny\ny", expected => qr/Failures:\n failingslackbuild2: failingslackbuild2[.]SlackBuild return non-zero\n\z/, exit => 3 }); -script (qw/ sboremove nonexistentslackbuild /, {input => "y\ny", test => 0 }); +script (qw/ sboinstall failingslackbuild2 /, { input => "y\ny\ny", expected => qr/Failures:\n failingslackbuild2: failingslackbuild2[.]SlackBuild return non-zero\n\z/, exit => 3 }); +script (qw/ sboremove nonexistentslackbuild /, { input => "y\ny", test => 0 }); # 8-9: Failing download and md5sum with working dep SKIP: { skip "Not doing online tests", 2 unless $ENV{TEST_ONLINE}; - script (qw/ sboinstall failingdownload2 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n!, exit => 3 }); - script (qw/ sboinstall failingmd5sum2 /, {input => "y\ny\ny\nn", expected => qr!Failures:\n!, exit => 3 }); + script (qw/ sboinstall failingdownload2 /, { input => "y\ny\ny\nn", expected => qr!Failures:\n!, exit => 5 }); + script (qw/ sboinstall failingmd5sum2 /, { input => "y\ny\ny\nn", expected => qr!Failures:\n!, exit => 4 }); } # Cleanup -- cgit v1.2.3