TEST needs to binmode the file handle that is reading the TAP, else it
Nicholas Clark [Sun, 14 May 2006 12:27:19 +0000 (12:27 +0000)]
can get killed if TEST's environment has made it default all opens to
UTF-8 but the TAP is not UTF-8.

p4raw-id: //depot/perl@28192

t/TEST

diff --git a/t/TEST b/t/TEST
index 39e889c..3e2fdf1 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -406,6 +406,11 @@ EOT
            open(RESULTS, $compile_cmd)
                or print "can't compile '$compile_cmd': $!.\n";
        }
+       # Our environment may force us to use UTF-8, but we can't be sure that
+       # anything we're reading from will be generating (well formed) UTF-8
+       # This may not be the best way - possibly we should unset ${^OPEN} up
+       # top?
+       binmode RESULTS;
 
        my $failure;
        my $next = 0;