diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-29 21:56:47 -0500 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2015-12-29 21:56:47 -0500 |
commit | 04795a33e2b8a830c447f623cfde9adb46cde4c4 (patch) | |
tree | 484508b2c843af7d7d2c2ba87f76a0c1c08add5a /t/install.t | |
parent | f85ddc709ae55ee19471a27e4dc550d1062966cd (diff) | |
download | sbotools2-04795a33e2b8a830c447f623cfde9adb46cde4c4.tar.xz |
Add test for failing slackbuild
See #23
Diffstat (limited to 't/install.t')
-rwxr-xr-x | t/install.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/install.t b/t/install.t index 830ee3d..33753e4 100755 --- a/t/install.t +++ b/t/install.t @@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib"; use Test::Execute; if ($ENV{TEST_INSTALL}) { - plan tests => 8; + plan tests => 9; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -27,6 +27,7 @@ sub cleanup { unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild4/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild5/perf.dummy"; + unlink "$RealBin/LO/failingslackbuild/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); @@ -94,6 +95,9 @@ script (qw/ sboremove nonexistentslackbuild5 /, { input => "y\ny", test => 0 }); script (qw/ sboinstall nonexistentslackbuild4 /, { input => "y\ny", expected => qr/nonexistentslackbuild5 added to install queue.*Install queue: nonexistentslackbuild5/s }); script (qw/ sboremove nonexistentslackbuild4 nonexistentslackbuild5 /, { input => "y\ny\ny", test => 0 }); +# 9: sboinstall failingslackbuild +script (qw/ sboinstall failingslackbuild /, { input => "y\ny", expected => qr/Failures:\n failingslackbuild: failingslackbuild.SlackBuild return non-zero\n\z/, exit => 3 }); + # Cleanup END { set_lo('delete'); |