Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

commit fetchrow_arrayref tests

  • Loading branch information...
commit 46bff630f2da04ea8255d1a107c2605d9f03877e 1 parent ce8eda8
Moritz Lenz moritz authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 t/99-common.pl6
10 t/99-common.pl6
View
@@ -5,7 +5,7 @@
#use Test; # "use" dies in a runtime eval
#use DBIish;
diag "Testing MiniDBD::$*mdriver";
-plan 33;
+plan 35;
sub magic_cmp(@a, @b) {
my $res = @a[0] eq @b[0]
@@ -135,12 +135,12 @@ else { skip 'fetchrow_hashref not implemented', 2 }
# TODO: weird sth behavior workaround! Any sth concerning call at this point
# will return empty or (properly) fail if something is called on that
# sth - after this, everything works fine again.
-if 'fetchrow_arrayref' eq any ($sth.^methods) {
+if $sth.can('colum_names') {
+ $sth.execute;
my $arrayref = $sth.fetchrow_arrayref(); #'called fetchrow_arrayref'; #test23
$sth.finish;
- #is $arrayref.elems, 4, "fetchrow_arrayref returns 4 fields in a row"; #test 24
- #is $arrayref, [ 'TAFM', 'Mild fish taco', '1', '4.85' ],
- #'selected data matches test data'; #test 23
+ is $arrayref.elems, 4, "fetchrow_arrayref returns 4 fields in a row"; #test 24
+ ok magic_cmp($arrayref, [ 'TAFM', 'Mild fish taco', 1, 4.85 ]), 'selected data matches test data'; #test 23
}
else { skip 'fetchrow_arrayref not implemented', 2 }
Please sign in to comment.
Something went wrong with that request. Please try again.