aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-11-04 11:02:10 -0600
committerJacob Pipkin <j@dawnrazor.net>2012-11-04 11:02:10 -0600
commit9d47b96f516e9418edf2ed2db39c56faff62fd02 (patch)
tree2ee0bff1417f8b239dcfd5507dc46de5189ff113
parentab50ab7cba6054047f51b196b6bc8d9bc359e854 (diff)
downloadsbotools2-9d47b96f516e9418edf2ed2db39c56faff62fd02.tar.xz
tests added for new get_sbo_location capabilities (all fail)
-rwxr-xr-xt/test.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/test.t b/t/test.t
index 92dc410..d3e2017 100755
--- a/t/test.t
+++ b/t/test.t
@@ -63,11 +63,21 @@ for my $key (keys @$installed) {
}
print "completed pseudo-random testing of get_installed_sbos \n";
-# 19-20, get_sbo_location tests
+# get_sbo_location tests
is (get_sbo_location ('nginx'), "$sbo_home/network/nginx",
'get_sbo_location is good');
is (get_sbo_location ('omgwtfbbq'), undef,
'get_sbo_location returns false with not-an-sbo input');
+my @finds = qw(nginx gmpc);
+my @locs = get_sbo_location (@finds);
+is ($locs[0], "$sbo_home/network/nginx",
+ 'get_sbo_location passed array #1 good');
+is ($locs[1], "$sbo_home/audio/gmpc", 'get_sbo_location passed array #2 good');
+@locs = get_sbo_location (\@finds);
+is ($locs[0], "$sbo_home/network/nginx",
+ 'get_sbo_location passed array ref #1 good');
+is ($locs[1], "$sbo_home/audio/gmpc",
+ 'get_sbo_location passed array ref #2 good');
# 21-22, get_available_updates tests
my $updates = get_available_updates;