diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-04 01:00:27 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-04 01:00:27 +0200 |
commit | f41ca3d2f76ffc21ccba08033dca45202e461921 (patch) | |
tree | deb6df32ea0dde763906dafaf3e59e80154ecb70 | |
parent | 90b92fc530a2583025cc937c401eb0da2832ddb7 (diff) | |
download | sbotools2-f41ca3d2f76ffc21ccba08033dca45202e461921.tar.xz |
19-unit.t: add test for revert_slackbuild
-rwxr-xr-x | t/19-unit.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/19-unit.t b/t/19-unit.t index 80ba3f0..b9d7116 100755 --- a/t/19-unit.t +++ b/t/19-unit.t @@ -10,8 +10,9 @@ use FindBin '$RealBin'; use lib "$RealBin/../SBO-Lib/lib"; use SBO::Lib qw/ script_error usage_error open_fh %config indent get_installed_packages get_sbo_location get_sbo_locations get_local_outdated_versions /; use Capture::Tiny qw/ capture_merged /; +use File::Temp 'tempdir'; -plan tests => 38; +plan tests => 39; # 1-2: test script_error(); { @@ -228,3 +229,9 @@ SKIP: { { is (SBO::Lib::get_filename_from_link('/'), undef, "get_filename_from_link() returned undef"); } + +# 39: test revert_slackbuild(); +{ + my $tmp = tempdir(CLEANUP => 1); + is (SBO::Lib::revert_slackbuild("$tmp/foo"), 1, "revert_slackbuild() returned 1"); +} |