> Hi Merijn,
>
> We have to think about both tests ...
Here ya go …
--8<---
diff --git a/t/49dbd_file.t b/t/49dbd_file.t
index 4bae4bd..61f75ea 100644
--- a/t/49dbd_file.t
+++ b/t/49dbd_file.t
@@ -99,7 +99,7 @@ SKIP: {
my @tfhl;
# Now test some basic SQL statements
-my $tbl_file = File::Spec->catfile (Cwd::abs_path( $dir ), "$tbl.txt");
+my $tbl_file = File::Spec->catfile (Cwd::abs_path ($dir), "$tbl.txt");
ok ($dbh->do ("create table $tbl (txt varchar (20))"), "Create table $tbl") or diag $dbh->errstr;
ok (-f $tbl_file, "Test table exists");
@@ -122,12 +122,12 @@ is_deeply ($dbh->f_get_meta ([$tbl, "t_sbdgf_53442Gz"], [qw(f_dir f_ext)]),
my @layer = grep { $_ eq "encoding($encoding)" } @tfhl;
is (scalar @layer, 1, "encoding shows in layer");
-my @tables = $dbh->func( "list_tables" );
-is_deeply( \@tables, ["000_just_testing", $tbl], "Listing tables gives test table" );
+my @tables = sort $dbh->func ("list_tables");
+is_deeply (\@tables, [sort "000_just_testing", $tbl], "Listing tables gives test table");
-ok ($sth = $dbh->table_info(), "table_info");
-@tables = $sth->fetchall_arrayref;
-is_deeply( \@tables, [ [ map { [ undef, undef, $_, 'TABLE', 'FILE' ] } ("000_just_testing", $tbl) ] ], "table_info gives test table" );
+ok ($sth = $dbh->table_info (), "table_info");
+@tables = sort { $a->[2] cmp $b->[2] } @{$sth->fetchall_arrayref};
+is_deeply (\@tables, [ map { [ undef, undef, $_, 'TABLE', 'FILE' ] } "000_just_testing", $tbl ], "table_info gives test table");
SKIP: {
$using_dbd_gofer and skip "modifying meta data doesn't work with Gofer-AutoProxy", 4;
@@ -145,7 +145,7 @@ SKIP: {
$dbh->errstr and diag $dbh->errstr;
}
-my $uctbl = uc($tbl);
+my $uctbl = uc ($tbl);
ok ($sth = $dbh->prepare ("select * from $uctbl"), "Prepare select * from $uctbl");
$rowidx = 0;
SKIP: {
-->8---
All tests successful.
Files=183, Tests=10373, 63 wallclock secs ( 1.58 usr 0.32 sys + 51.42 cusr 5.10 csys = 58.42 CPU)
Result: PASS
PERL_DL_NONLAZY=1 /pro/bin/perl "-Iblib/lib" "-Iblib/arch"
test.pl
test.pl
DBI test application $Revision$
Switch: DBI 1.623 by Tim Bunce, 1.623
Available Drivers: AnyData, CSV, DBM, ExampleP, File, Gofer, Multiplex, ODBC, Oracle, Pg, Proxy, SQLite, Sponge, iPod, mysql
dbi:ExampleP:: testing 3 sets of 20 connections:
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
Connecting... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Disconnecting...
connect 20 and disconnect them, 3 times: 0.0019s / 60 = 0.0000s
Testing handle creation speed...
125000 NullP sth/s perl 5.016000 i686-linux-64int-ld (gcc 4.6.2 -O2) 0.000008s
test.pl done