develooper Front page | perl.perl5.porters | Postings from November 2000

[PATCH: perl@7795] fix comp/require.t for EBCDIC by avoiding utf8

Thread Next
From:
Peter Prymmer
Date:
November 22, 2000 16:33
Subject:
[PATCH: perl@7795] fix comp/require.t for EBCDIC by avoiding utf8
Message ID:
Pine.OSF.4.10.10011221634240.519633-100000@aspara.forte.com


FWIW I note that the new va_dcl stuff appears a bit messy on OS/390
where a run of `sh Configure -Dusedevel -des` contains:
-----------
Checking if your /usr/local/bin/make program sets $(MAKE)...
mode_t found.
<stdarg.h> found.
<varargs.h> found.
We'll include <stdarg.h> to get va_dcl definition.
WARNING CBC3280 ./try.c:13    Function argument assignment between types 
"char*.
FSUM3065 The COMPILE step ended with return code 4.
CEE3204S The system detected a protection exception.
         From entry point ivfprintf at compile unit offset +0000007E at 
address.
It seems that va_copy() or similar will be needed.
size_t found.
-----

At any rate enclosed please find a patch that takes the "let us continue to 
pretend utf8 does not exist" strategy for t/comp/require.t which turns 
`make test` results of:

---------------------------------
comp/require.........String found where operator expected at bleah.pm line 2, 
n"
  (Might be a runaway multi-line "" string starting on line 1)
        (Missing semicolon on previous line?)
String found where operator expected at bleah.pm line 1, near "BpBrBiBnBt 
"BoBk"
        (Do you need to predeclare BpBrBiBnBt?)
String found where operator expected at bleah.pm line 1, near "BpBrBiBnBt 
"BoBk"
        (Do you need to predeclare BpBrBiBnBt?)
FAILED at test 13
<snip>
Failed 15 test scripts out of 255, 94.12% okay.
------------

to:

---------------------------------
comp/require.........ok
<snip>
Failed 14 test scripts out of 255, 94.51% okay.
------------

And here is the proposed patch:


--- t/comp/require.t.orig	Sun Oct 22 11:38:01 2000
+++ t/comp/require.t	Wed Nov 22 16:09:54 2000
@@ -8,7 +8,9 @@
 
 # don't make this lexical
 $i = 1;
-print "1..23\n";
+my $tests = 23;
+if (ord('A') == 193) { $tests = 17; }
+print "1..$tests\n";
 
 sub do_require {
     %INC = ();
@@ -80,19 +82,6 @@
 print "not " unless 5.5.1 gt v5.5;
 print "ok ",$i++,"\n";
 
-{
-    use utf8;
-    print "not " unless v5.5.640 eq "\x{5}\x{5}\x{280}";
-    print "ok ",$i++,"\n";
-
-    print "not " unless v7.15 eq "\x{7}\x{f}";
-    print "ok ",$i++,"\n";
-
-    print "not "
-      unless v1.20.300.4000.50000.600000 eq "\x{1}\x{14}\x{12c}\x{fa0}\x{c350}\x{927c0}";
-    print "ok ",$i++,"\n";
-}
-
 # interaction with pod (see the eof)
 write_file('bleah.pm', "print 'ok $i\n'; 1;\n");
 require "bleah.pm";
@@ -124,6 +113,21 @@
 dofile();
 sub dofile { do "bleah.do"; };
 print $x;
+
+if (ord('A') == 193) { exit; } # don't try utf8 things on EBCDIC
+
+{
+    use utf8;
+    print "not " unless v5.5.640 eq "\x{5}\x{5}\x{280}";
+    print "ok ",$i++,"\n";
+
+    print "not " unless v7.15 eq "\x{7}\x{f}";
+    print "ok ",$i++,"\n";
+
+    print "not "
+      unless v1.20.300.4000.50000.600000 eq "\x{1}\x{14}\x{12c}\x{fa0}\x{c350}\x{927c0}";
+    print "ok ",$i++,"\n";
+}
 
 # UTF-encoded things
 my $utf8 = chr(0xFEFF);
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