From f41ca3d2f76ffc21ccba08033dca45202e461921 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Wed, 4 May 2016 01:00:27 +0200 Subject: 19-unit.t: add test for revert_slackbuild --- t/19-unit.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 't') 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"); +} -- cgit v1.2.3