diff options
-rwxr-xr-x | t/14-jobs.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/14-jobs.t b/t/14-jobs.t index 1e28d09..52d8be7 100755 --- a/t/14-jobs.t +++ b/t/14-jobs.t @@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib"; use Test::Sbotools qw/ set_lo set_jobs sboinstall sboremove sboconfig /; if ($ENV{TEST_INSTALL}) { - plan tests => 4; + plan tests => 6; } else { plan skip_all => "Only run these tests if TEST_INSTALL=1"; } @@ -59,6 +59,17 @@ sboconfig(qw/ -j FALSE /, { test => 0 }); } sboremove('nonexistentslackbuild', { input => "y\ny", test => 0 }); +# 5: sboinstall -j 0 with jobs set to 2 +sboconfig(qw/ -j 2 /, { test => 0 }); +{ + my ($time) = sboinstall(qw/ -j 0 -r nonexistentslackbuild /, { expected => qr/^real\s+\d+m([\d.]+)s$/m, test => 0 }); + ok ($time > 5, "-j 0 took the expected amount of time"); +} +sboremove('nonexistentslackbuild', { input => "y\ny", test => 0 }); + +#6: sboinstall -j invalid +sboinstall(qw/ -j invalid nonexistentslackbuild /, { exit => 1, expected => "You have provided an invalid value for -j|--jobs\n" }); + # Cleanup END { |