diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-09 00:51:17 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-09 00:51:17 +0200 |
commit | 728fed6f7d548cceabc508636be6c575648532eb (patch) | |
tree | 861613d2ca3d74346857256ba1dd71f3c3809f15 /t | |
parent | 3f19d3480369ba1e586cb7db64706c9e325fb52d (diff) | |
download | sbotools2-728fed6f7d548cceabc508636be6c575648532eb.tar.xz |
29-race-sboremove.t: use load() from Test::Sbotools
Diffstat (limited to 't')
-rwxr-xr-x | t/28-race-sboremove.t | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/t/28-race-sboremove.t b/t/28-race-sboremove.t index 36c35d0..42d205e 100755 --- 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 |