commit f41ca3d2f76ffc21ccba08033dca45202e461921
parent 90b92fc530a2583025cc937c401eb0da2832ddb7
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Wed, 4 May 2016 01:00:27 +0200
19-unit.t: add test for revert_slackbuild
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git 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");
+}