[tapx-dev] [commit][181] Fix for test failure under 5.6.2.

andy at hexten.net andy at hexten.net
Sun Jul 15 20:45:01 BST 2007


Revision: 181
Author:   andy
Date:     2007-07-15 20:45:01 +0100 (Sun, 15 Jul 2007)

Log Message:
-----------
Fix for test failure under 5.6.2. 5.6.2 doesn't support three arg open '>&'.

Modified Paths:
--------------
    trunk/t/compat/test-harness-compat.t

Modified: trunk/t/compat/test-harness-compat.t
===================================================================
--- trunk/t/compat/test-harness-compat.t	2007-07-14 18:12:49 UTC (rev 180)
+++ trunk/t/compat/test-harness-compat.t	2007-07-15 19:45:01 UTC (rev 181)
@@ -769,7 +769,7 @@
         if ( exists $want->{name} ) {
             $want->{name} = local_name( $want->{name} );
         }
-        $new->{ local_name($file) } = $want;
+        $new->{ local_name( $file ) } = $want;
     }
     return $new;
 }
@@ -798,14 +798,15 @@
 
         # For now we supress STDERR because it crufts up /our/ test
         # results. Should probably capture and analyse it.
-        open my $olderr, '>&', \*STDERR or die $!;
+        local *OLDERR;
+        open OLDERR, '>&STDERR' or die $!;
         open STDERR, '>', File::Spec->devnull or die $!;
-        
+
         my ( $tot, $fail, $todo, $harness, $aggregate )
           = execute_tests( tests => \@test_files );
-          
-        open STDERR, '>&', $olderr or die $!;
 
+        open STDERR, '>&OLDERR' or die $!;
+
         my $bench = delete $tot->{bench};
         isa_ok $bench, 'Benchmark';
 
@@ -814,8 +815,7 @@
         my $ltodo   = local_result( $result->{todo} );
 
         is_deeply_dump $tot, $result->{totals}, "totals match for $test_key";
-        is_deeply_dump $fail, $lfailed,
-          "failure summary matches for $test_key";
-        is_deeply_dump $todo, $ltodo, "todo summary matches for $test_key";
+        is_deeply_dump $fail, $lfailed, "failure summary matches for $test_key";
+        is_deeply_dump $todo, $ltodo,   "todo summary matches for $test_key";
     }
 }




More information about the tapx-dev mailing list