aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-12 19:20:01 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-12 19:20:01 +0200
commit1f66aa2686879dd96abeb51845387043dd0c307c (patch)
tree5f880fa3224277e3df051476620f30be3a9b377c
parent9bb214765ad28de04d2869fd6513fc1649e122ff (diff)
downloadsbotools2-1f66aa2686879dd96abeb51845387043dd0c307c.tar.xz
24-unit-sboconfig.t: use Test::Sbotools's load()
-rwxr-xr-xt/24-unit-sboconfig.t20
1 files changed, 2 insertions, 18 deletions
diff --git a/t/24-unit-sboconfig.t b/t/24-unit-sboconfig.t
index 7f97827..ad74469 100755
--- a/t/24-unit-sboconfig.t
+++ b/t/24-unit-sboconfig.t
@@ -5,30 +5,14 @@ use warnings;
use Test::More;
use Test::Exit;
use FindBin '$RealBin';
-use lib "$RealBin/../SBO-Lib/lib";
+use lib $RealBin;
+use Test::Sbotools qw/ load /;
use Capture::Tiny qw/ capture_merged /;
use File::Temp 'tempdir';
use Cwd;
plan tests => 2;
-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 = $@;
-
- note explain { ret => $ret, exit => $exit, out => $out, eval => $eval, err => $err, do_err => $do_err } if $opts{explain};
-}
-
# 1-2: sboconfig unit tests...
{
load('sboconfig');