From 53ad14df5e59d8966363d6f05885dc6d0d9d098e Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 15 Jul 2016 19:12:55 +0200 Subject: 14-jobs.t: add test for sboupgrade -j 0 --- t/14-jobs.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 { -- cgit v1.2.3