aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-27 00:02:02 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-05-27 00:02:02 +0200
commit446abf9a19edee4b807d617661467bb2f38ad1dc (patch)
tree2d061c997b6cad73c6bfba7a74d39441177d26ea
parentda2f4da2ffe22ba9d4704f46b31b50c2d368fe3f (diff)
downloadsbotools2-446abf9a19edee4b807d617661467bb2f38ad1dc.tar.xz
01-unit.t: add test for perform_sbo(JOBS => FALSE)
-rwxr-xr-xt/01-unit.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/01-unit.t b/t/01-unit.t
index 0c1a40b..1e09fb1 100755
--- 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');
+}