diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-15 19:12:55 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-07-15 19:12:55 +0200 |
commit | 53ad14df5e59d8966363d6f05885dc6d0d9d098e (patch) | |
tree | ae7f2adca1f1f70492097288cb209ade2676260a | |
parent | 45cbf7f38c1d9a44a5cd35bb2e03214e46669c17 (diff) | |
download | sbotools2-53ad14df5e59d8966363d6f05885dc6d0d9d098e.tar.xz |
14-jobs.t: add test for sboupgrade -j 0
-rwxr-xr-x | t/14-jobs.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/14-jobs.t b/t/14-jobs.t index 2a9f03c..7fd45ad 100755 --- a/t/14-jobs.t +++ b/t/14-jobs.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ set_lo set_jobs sboinstall sboremove sboconfig restore_perf_dummy make_slackbuilds_txt sboupgrade /; if ($ENV{TEST_INSTALL}) { - plan tests => 8; + plan tests => 9; } else { plan skip_all => "Only run these tests if TEST_INSTALL=1"; } @@ -82,6 +82,13 @@ sboupgrade qw/ -j invalid nonexistentslackbuild /, { exit => 1, expected => "You ok ($time < 5, "sboupgrade -j 2 took less time than otherwise"); } +#9: sboupgrade -j 0 +{ + set_lo "$RealBin/LO-jobs"; + my ($time) = sboupgrade qw/ -j 0 nonexistentslackbuild /, { input => "y\ny", expected => qr/^real\s+\d+m([\d.]+)s$/m, test => 0 }; + ok ($time > 5, "sboupgrade -j 0 took the expected amount of time"); +} + # Cleanup END { |