diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-27 00:02:02 +0200 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-27 00:02:02 +0200 | 
| commit | 446abf9a19edee4b807d617661467bb2f38ad1dc (patch) | |
| tree | 2d061c997b6cad73c6bfba7a74d39441177d26ea | |
| parent | da2f4da2ffe22ba9d4704f46b31b50c2d368fe3f (diff) | |
| download | sbotools2-446abf9a19edee4b807d617661467bb2f38ad1dc.tar.xz | |
01-unit.t: add test for perform_sbo(JOBS => FALSE)
| -rwxr-xr-x | t/01-unit.t | 11 | 
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'); +} | 
