develooper Front page | perl.perl5.porters | Postings from January 2001

[PATCH: perl@8531] EBCDIC cleanup for B test

Thread Next
From:
Peter Prymmer
Date:
January 26, 2001 16:35
Subject:
[PATCH: perl@8531] EBCDIC cleanup for B test
Message ID:
Pine.OSF.4.10.10101261635400.14820-100000@aspara.forte.com

I hope this proves adequate for BS2000 folks (an OS I cannot test).
This does the trick (at least for a static build) on OS/390.

File affected:

    t/lib/b.t

Enjoy.

--- t/lib/b.t.orig	Fri Jan 26 16:03:43 2001
+++ t/lib/b.t	Fri Jan 26 16:30:06 2001
@@ -71,6 +71,8 @@
 my $Is_VMS = $^O eq 'VMS';
 $a = `$^X "-I../lib" "-MO=Deparse" -anle 1 2>&1`;
 $a =~ s/-e syntax OK\n//g;
+$a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037
+$a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc'
 $b = <<'EOF';
 
 LINE: while (defined($_ = <ARGV>)) {
@@ -140,7 +142,12 @@
     print "# use5005threads: test $test skipped\n";
 } else {
     $a = `$^X "-I../lib" "-MO=Showlex" -e "my %one" 2>&1`;
-    print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s;
+    if (ord('A') != 193) { # ASCIIish
+        print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s;
+    } 
+    else { # EBCDICish C<1: PVNV (0x1a7ede34) "%\226\225\205">
+        print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%\\[0-9].*sv_undef.*HV/s;
+    }
 }
 ok;
 
End of Patch.

Peter Prymmer




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About