sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 4554c992ec401ccab72c6cca0366c59051cfbc3e
parent 248b215ff3021b65c7c2ac9af4339e0dd14fd632
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Sun, 24 Apr 2016 16:54:04 +0200

12-readme.t: test output from failed commands

Diffstat:
Mt/12-readme.t | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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 /); }; }