aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-24 16:54:04 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-04-24 16:54:04 +0200
commit4554c992ec401ccab72c6cca0366c59051cfbc3e (patch)
tree8a1d0e14a8f0ae6bbef0e5b6362ab3e92d931884
parent248b215ff3021b65c7c2ac9af4339e0dd14fd632 (diff)
downloadsbotools2-4554c992ec401ccab72c6cca0366c59051cfbc3e.tar.xz
12-readme.t: test output from failed commands
-rwxr-xr-xt/12-readme.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/12-readme.t b/t/12-readme.t
index 5273527..f88499f 100755
--- a/t/12-readme.t
+++ b/t/12-readme.t
@@ -10,7 +10,7 @@ use lib $RealBin;
use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboinstall sboremove /;
if ($ENV{TEST_INSTALL}) {
- plan tests => 6;
+ plan tests => 7;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -55,6 +55,9 @@ SKIP: {
sboinstall 'commandinreadme', { input => "y\ny\ny", expected => qr{It looks like this slackbuild requires the following command\(s\) to be run first:.*groupadd -g 200 test.*useradd -u 200 -g 200 -d /tmp test.*Shall I run them prior to building.*}s };
sboremove 'commandinreadme', { input => "y\ny", test => 0 };
+
+ sboinstall 'commandinreadme', { input => "y\ny\ny", expected => qr/groupadd.*exited non-zero/ };
+ sboremove 'commandinreadme', { input => "y\ny", test => 0 };
capture_merged { system(qw/ userdel test /); system(qw/ groupdel test /); };
}