commit 446abf9a19edee4b807d617661467bb2f38ad1dc
parent da2f4da2ffe22ba9d4704f46b31b50c2d368fe3f
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Fri, 27 May 2016 00:02:02 +0200
01-unit.t: add test for perform_sbo(JOBS => FALSE)
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/t/01-unit.t b/t/01-unit.t
@@ -10,7 +10,7 @@ use SBO::Lib qw/ script_error usage_error open_fh %config indent get_installed_p
use Capture::Tiny qw/ capture_merged /;
use File::Temp 'tempdir';
-plan tests => 49;
+plan tests => 52;
# 1-2: test script_error();
{
@@ -278,3 +278,12 @@ SKIP: {
is ($exit, 1, 'user_prompt() exited with 1');
is ($out, "Unable to locate foo in the SlackBuilds.org tree.\n", 'user_prompt() gave correct output');
}
+
+# 50-52: test perform_sbo();
+{
+ my @res = SBO::Lib::perform_sbo(JOBS => 'FALSE', LOCATION => '/foo', ARCH => 1);
+
+ is ($res[0], "Unable to backup /foo/foo.SlackBuild to /foo/foo.SlackBuild.orig\n", 'perform_sbo returned correct pkg');
+ is ($res[1], undef, 'perform_sbo returned correct src');
+ is ($res[2], 6, 'perform_sbo returned correct exit');
+}