sbotools2

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

commit 728fed6f7d548cceabc508636be6c575648532eb
parent 3f19d3480369ba1e586cb7db64706c9e325fb52d
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Tue,  9 Aug 2016 00:51:17 +0200

29-race-sboremove.t: use load() from Test::Sbotools

Diffstat:
Mt/28-race-sboremove.t | 21+--------------------
1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/t/28-race-sboremove.t b/t/28-race-sboremove.t @@ -11,7 +11,7 @@ use Capture::Tiny qw/ capture_merged /; use File::Temp 'tempdir'; use Cwd; use feature 'state'; -use Test::Sbotools qw/ set_repo set_lo sboinstall sbosnap /; +use Test::Sbotools qw/ set_repo set_lo sboinstall sbosnap load /; if ($ENV{TEST_INSTALL}) { plan tests => 2; @@ -19,25 +19,6 @@ if ($ENV{TEST_INSTALL}) { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } -sub load { - my ($script, %opts) = @_; - - local @ARGV = exists $opts{argv} ? @{ $opts{argv} } : '-h'; - my ($ret, $exit, $out, $do_err); - my $eval = eval { - $out = capture_merged { $exit = exit_code { - $ret = do "$RealBin/../$script"; - $do_err = $@; - }; }; - 1; - }; - my $err = $@; - - my $explain = { ret => $ret, exit => $exit, out => $out, eval => $eval, err => $err, do_err => $do_err }; - note explain $explain if $opts{explain}; - return $explain; -} - set_lo("$RealBin/LO2"); # set up git repo with readme slackbuild