diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-05-18 17:02:33 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2017-05-18 17:02:33 +0200 |
commit | d21bd9fc2044ee2634ab7a26addf2bca5f6bc5e2 (patch) | |
tree | 4934240dc69317e6a30ddd03ba31a259918bf0f2 | |
parent | 74ceb302d143950e02606329cda0fbca70a99985 (diff) | |
download | sbotools-d21bd9fc2044ee2634ab7a26addf2bca5f6bc5e2.tar.xz |
t/01-unit.t: remove pull_sbo_tree test
-rwxr-xr-x | t/01-unit.t | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/t/01-unit.t b/t/01-unit.t index fea31b3..f1aabb0 100755 --- a/t/01-unit.t +++ b/t/01-unit.t @@ -11,7 +11,7 @@ use Capture::Tiny qw/ capture_merged /; use File::Temp 'tempdir'; use Cwd; -plan tests => 62; +plan tests => 61; # 1-2: test script_error(); { @@ -196,12 +196,6 @@ SKIP: { is (SBO::Lib::generate_slackbuilds_txt(), 1, 'generate_slackbuilds_txt() returned 1'); system(qw! rm -r /usr/sbo/repo !) if -d '/usr/sbo/repo'; - - local $config{REPO} = ''; - capture_merged { SBO::Lib::pull_sbo_tree(); }; - ok (!-e '/usr/sbo/repo/SLACKBUILDS.TXT', 'SLACKBUILDS.TXT was not generated by pull_sbo_tree()'); - - system(qw! rm -r /usr/sbo/repo !) if -d '/usr/sbo/repo'; system(qw! mv /usr/sbo/backup /usr/sbo/repo !) if -d '/usr/sbo/backup'; my $sbohome = '/usr/sbo'; @@ -218,7 +212,7 @@ SKIP: { system('mv', "$sbohome.bak", $sbohome); } -# 38: test get_installed_packages(); +# 37: test get_installed_packages(); { system(qw!mv /var/log/packages /var/log/packages.backup!); system(qw!mkdir -p /var/log/packages!); @@ -228,7 +222,7 @@ SKIP: { system(qw!mv /var/log/packages.backup /var/log/packages!); } -# 39-41: test get_sbo_location() and get_sbo_locations(); +# 38-40: test get_sbo_location() and get_sbo_locations(); { my $exit; my $out = capture_merged { $exit = exit_code { get_sbo_location([]); }; }; @@ -245,18 +239,18 @@ SKIP: { } } -# 42: test get_local_outdated_versions(); +# 41: test get_local_outdated_versions(); { local $config{LOCAL_OVERRIDES} = 'FALSE'; is(scalar get_local_outdated_versions(), 0, 'get_local_outdated_versions() returned an empty list'); } -# 43: test get_filename_from_link(); +# 42: test get_filename_from_link(); { is (SBO::Lib::get_filename_from_link('/'), undef, "get_filename_from_link() returned undef"); } -# 44-47: test revert_slackbuild(); +# 43-46: test revert_slackbuild(); { my $tmp = tempdir(CLEANUP => 1); is (SBO::Lib::revert_slackbuild("$tmp/foo"), 1, "revert_slackbuild() returned 1"); @@ -267,7 +261,7 @@ SKIP: { ok (!-f "$tmp/foo.orig", 'foo.orig is no more'); } -# 48: test get_src_dir(); +# 47: test get_src_dir(); SKIP: { skip 'Test invalid if /foo-bar exists.', 1 if -e '/foo-bar'; my $scalar = ''; @@ -277,13 +271,13 @@ SKIP: { is (scalar @{ SBO::Lib::get_src_dir($fh) }, 0, "get_src_dir() returned an empty array ref"); } -# 49: test get_readme_contents(); +# 48: test get_readme_contents(); { my @ret = get_readme_contents(undef); is ($ret[0], undef, "get_readme_contents() returned undef"); } -# 50-51: test user_prompt(); +# 49-50: test user_prompt(); { my $exit; my $out = capture_merged { $exit = exit_code { user_prompt('foo', undef); }; }; @@ -292,7 +286,7 @@ SKIP: { is ($out, "Unable to locate foo in the SlackBuilds.org tree.\n", 'user_prompt() gave correct output'); } -# 52-54: test perform_sbo(); +# 51-53: test perform_sbo(); SKIP: { skip 'Tests invalid if /foo exists.', 3 if -e "/foo"; @@ -303,7 +297,7 @@ SKIP: { is ($res[2], 6, 'perform_sbo returned correct exit'); } -# 55-61: test version_cmp(); +# 54-60: test version_cmp(); { chomp(my $kv = `uname -r`); $kv =~ s/-/_/g; @@ -324,7 +318,7 @@ SKIP: { is (SBO::Lib::version_cmp('1.0', '1.0_en_US'), 0, "version_cmp(1.0, 1.0_en_US) returned 0"); } -# 62: test check_multilib(); +# 61: test check_multilib(); { my $file = "/etc/profile.d/32dev.sh"; |