Minor tweaks for the test.utf16 target, by Jarkko
Rafael Garcia-Suarez [Tue, 12 Oct 2004 16:49:53 +0000 (16:49 +0000)]
p4raw-id: //depot/perl@23362

t/TEST

diff --git a/t/TEST b/t/TEST
index afce704..fb3adb9 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -149,7 +149,7 @@ elsif ($with_utf16) {
                unlink($u);
                if (open(A, $a)) {
                    if (open(U, ">$u")) {
-                       print U pack("$f", 0xFEFF);
+                       print U pack("$f", 0xFEFF) if $b;
                        while (<A>) {
                            print U pack("$f*", unpack("C*", $_));
                        }
@@ -248,6 +248,9 @@ EOT
        open(SCRIPT,"<$test") or die "Can't run $test.\n";
        $_ = <SCRIPT>;
        close(SCRIPT) unless ($type eq 'deparse');
+       if ($with_utf16) {
+           $_ =~ tr/\0//d;
+       }
        if (/#!.*\bperl.*\s-\w*([tT])/) {
            $switch = qq{"-$1"};
        }