diff options
author | j pipkin <j@dawnrazor.net> | 2013-09-20 13:56:07 -0500 |
---|---|---|
committer | j pipkin <j@dawnrazor.net> | 2013-09-20 13:56:07 -0500 |
commit | 7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b (patch) | |
tree | 68c94bec8942e02b7c8caf520bedf8478bdf76bb /t/test.t | |
parent | 4f68deb678ee9e8c5116435459914120560bef49 (diff) | |
download | sbotools2-7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b.tar.xz |
SBO-Lib/lib/SBO/Lib.pm, sboinstall, sboremove, sboupgrade: remove smartmatch
usage; t/test.t: remove smartmatch usage, fix bug where we were testing
@symlinks as though its contents would be in a specific order whereas actually
it is populated from a hash.
Diffstat (limited to 't/test.t')
-rwxr-xr-x | t/test.t | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -187,10 +187,13 @@ ok(check_multilib, 'check_multilib good'); # create_symlinks tests $downloads = get_sbo_downloads(LOCATION => "$sbo_home/system/wine", 32 => 1); my $symlinks = create_symlinks "$sbo_home/system/wine", $downloads; -is($$symlinks[0], "$sbo_home/system/wine/wine-1.4.1.tar.bz2", - '$symlinks[0] good for create_symlinks'); -is($$symlinks[1], "$sbo_home/system/wine/dibeng-max-2010-11-12.zip", - '$symlinks[1] good for create_symlinks'); +my ($have1, $have2); +for my $sl (@$symlinks) { + $have1++ if $sl eq "$sbo_home/system/wine/wine-1.4.1.tar.bz2"; + $have2++ if $sl eq "$sbo_home/system/wine/dibeng-max-2010-11-12.zip"; +} +ok($have1, '$create_symlinks test 1 passed.'); +ok($have2, '$create_symlinks test 2 passed.'); # grok_temp_file, get_src_dir/get_pkg_name tests my $tempdir = tempdir(CLEANUP => 1); @@ -334,7 +337,9 @@ for my $found (@$findings) { # get_inst_names test $installed = get_installed_packages 'SBO'; my $inst_names = get_inst_names $installed; -ok('zdoom' ~~ @$inst_names, 'get_inst_names is good'); +my %inst_names; +$inst_names{$_} = 1 for @$inst_names; +ok($inst_names{zdoom}, 'get_inst_names is good'); # get_reqs tests # $SBO::Lib::no_reqs = 0; |