sbotools2

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

commit 53ad14df5e59d8966363d6f05885dc6d0d9d098e
parent 45cbf7f38c1d9a44a5cd35bb2e03214e46669c17
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Fri, 15 Jul 2016 19:12:55 +0200

14-jobs.t: add test for sboupgrade -j 0

Diffstat:
Mt/14-jobs.t | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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 {