commit 4f7dea8f66ca469e018b7f5241df0d46dc4544e2
parent 8c25d0145a4d61bf0dd5846028b7fce37d0446b2
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Wed, 4 May 2016 01:22:05 +0200
12-readme.t: test not supplying any option when asked
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
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 => 7;
+ plan tests => 8;
} else {
plan skip_all => 'Only run these tests if TEST_INSTALL=1';
}
@@ -49,7 +49,10 @@ sboinstall 'envsettingtest2', { input => "n\ny\ny\nFOO=quux\ny\ny\nn", exit => 3
sboinstall 'envsettingtest2', { input => "y\nFOO=bar\ny\ny\nFOO=quux\ny\ny", expected => qr{It looks like envsettingtest has options.*Please supply any options here.*It looks like envsettingtest2 has options.*Please supply any options here.*Install queue: envsettingtest envsettingtest2.*Cleaning for envsettingtest2-1[.]0}s };
sboremove 'envsettingtest2', { input => "n\ny\ny\ny", test => 0 };
-# 6-7: sboinstall commandinreadme
+# 6: sboinstall envsettingtest - don't supply an option even if you say you intend to
+sboinstall 'envsettingtest', { input => "y\n\nn", expected => qr/Please supply any options here/ };
+
+# 7-8: sboinstall commandinreadme
SKIP: {
skip "Only run useradd/groupadd commands under Travis CI", 2 unless (defined $ENV{TRAVIS} and $ENV{TRAVIS} eq 'true');
skip "Only run useradd/groupadd commands if there is no test user/group", 2, if (defined getgrnam('test') or defined getpwnam('test'));