On Sun, 12 Jun 2005, Tim Bunce wrote:

> Thanks, applied. Change 1079.
> 
> Any chance you could patch a test into t/41prof_dump.t?

Done.  Without the prior patch the new test causes:

  Invalid Profile data leaf element at depth 1: HASH (type 11) at
  t/41prof_dump.t line 45.
  # Looks like you planned 12 tests but only ran 7.
  # Looks like your test died just after 7.

It passes with the patch.

-sam
--- DBI-1.48/t/41prof_dump.t    2004-12-14 10:31:37.000000000 -0500
+++ DBI-1.48.new/t/41prof_dump.t        2005-06-12 18:55:45.346028120 -0400
@@ -15,7 +15,7 @@
                plan skip_all => 'profiling not supported for DBI::PurePerl';
        }
        else {
-               plan tests => 11;
+               plan tests => 12;
        }
 }
 
@@ -37,6 +37,14 @@
 isa_ok( $sth, 'DBI::st' );
 $sth->execute(".");
 
+# check that flush_to_disk doesn't change Path if Path is undef (it
+# did before 1.49)
+{ 
+    local $dbh->{Profile}->{Path} = undef;
+    $sth->{Profile}->flush_to_disk();
+    is($dbh->{Profile}->{Path}, undef);
+}
+
 $sth->{Profile}->flush_to_disk();
 while ( my $hash = $sth->fetchrow_hashref ) {}
 

Reply via email to