From 446abf9a19edee4b807d617661467bb2f38ad1dc Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 27 May 2016 00:02:02 +0200 Subject: 01-unit.t: add test for perform_sbo(JOBS => FALSE) --- t/01-unit.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 't/01-unit.t') 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'); +} -- cgit v1.2.3