From 4554c992ec401ccab72c6cca0366c59051cfbc3e Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sun, 24 Apr 2016 16:54:04 +0200 Subject: 12-readme.t: test output from failed commands --- t/12-readme.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't/12-readme.t') 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 /); }; } -- cgit v1.2.3