diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-23 20:59:56 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-23 20:59:56 +0200 |
commit | 22555de384bb1e57003842fe494217a7ff0e73f4 (patch) | |
tree | 1ae95581cca8ee3206e7220a3d4d4182e353be9a | |
parent | 54176f66e534c5b711acdfae85b5f4cccf0beffd (diff) | |
download | sbotools2-22555de384bb1e57003842fe494217a7ff0e73f4.tar.xz |
01-unit.t: skip another test if there is no SLACKBUILDS.TXT
-rwxr-xr-x | t/01-unit.t | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/01-unit.t b/t/01-unit.t index 883935e..a7dde4c 100755 --- a/t/01-unit.t +++ b/t/01-unit.t @@ -213,10 +213,13 @@ SKIP: { is ($exit, 2, 'get_sbo_location([]) exited with 2'); is ($out, "A fatal script error has occurred:\nget_sbo_location requires an argument.\nExiting.\n", 'get_sbo_location([]) gave correct output'); - local $config{LOCAL_OVERRIDES} = 'FALSE'; - my %res = get_sbo_locations('nonexistentslackbuild'); + SKIP: { + skip 'Test invalid if no SLACKBUILDS.TXT exists.', 5 if ! -e '/usr/sbo/repo/SLACKBUILDS.TXT'; + local $config{LOCAL_OVERRIDES} = 'FALSE'; + my %res = get_sbo_locations('nonexistentslackbuild'); - is (%res+0, 0, q"get_sbo_locations('nonexistentslackbuild') returned an empty hash"); + is (%res+0, 0, q"get_sbo_locations('nonexistentslackbuild') returned an empty hash"); + } } # 37: test get_local_outdated_versions(); |