- else {
- my $compile;
- my $pl2c = "$testswitch -I../lib ../utils/perlcc --testsuite " .
- # -O9 for good measure, -fcog is broken ATM
- "$switch -Wb=-O9,-fno-cog -L .. " .
- "-I \".. ../lib/CORE\" $args $utf $test -o ";
-
- if( $^O eq 'MSWin32' ) {
- $test_executable = "$test.exe";
- # hopefully unused name...
- open HACK, "> xweghyz.pl";
- print HACK <<EOT;
-#!./perl
-
-open HACK, '.\\perl $pl2c $test_executable |';
-# cl.exe prints the name of the .c file on stdout (\%^\$^#)
-while(<HACK>) {m/^\\w+\\.[cC]\$/ && next;print}
-open HACK, '$test_executable |';
-while(<HACK>) {print}
-EOT
- close HACK;
- $compile = 'xweghyz.pl |';
- }
- else {
- $test_executable = "$test.plc";
- $compile = "./perl $pl2c $test_executable && $test_executable |";
- }
- unlink $test_executable if -f $test_executable;
- open(RESULTS, $compile)
- or print "can't compile '$compile': $!.\n";
- }
-
- $ok = 0;
- $next = 0;
- my $seen_leader = 0;
- my $seen_ok = 0;
- my @valgrind;
+ # 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;
+ my $seen_leader = 0;
+ my $seen_ok = 0;
+ my $trailing_leader = 0;
+ my $max;
+ my %todo;