--- SADAHIRO Tomoyuki <[EMAIL PROTECTED]> wrote:
>
> On Mon, 19 Dec 2005 04:01:27 -0800 (PST), rajarshi
> das <[EMAIL PROTECTED]> wrote
>
> > --- SADAHIRO Tomoyuki <[EMAIL PROTECTED]> wrote:
> >
> > > However I think the success of some tests in
> > > t/uni/class.t
> > > is a pretense since t/uni/class.t seems to have
> a
> > > bug on EBCDIC.
> > > (and maybe another uncertain regex bug hiding
> ...)
> > >
> > > For example the first test in t/uni/class.t is
> not
> > > portable to EBCDIC:
> > >
> > > my $str = join "", map chr($_), 0x20 ..
> 0x6F;
> >
> > I changed it with :
> > if (ord('A') == 193) {
> > $str = join "", map chr($_), 0x40, 0x5A, 0x7F,
> 0x7B,
> > 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E,
> 0x6B,
> > 0x60, 0x4B, 0x61, 0xF0 .. 0xF9, 0x7A, 0x5E, 0x4C,
> > 0x7E, 0x6E, 0x6F, 0x7C, 0xC1 .. 0xC9, 0xD1 ..
> 0xD9,
> > 0xE2 .. 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, 0x79,
> 0x81
> > .. 0x89, 0x91 .. 0x96;
> > }
> > else {
> > $str = join "", map chr($_), 0x20 .. 0x6F;
> > }
> >
> > And then the all the tests pass.
> >
> > Thanks,
> > Rajarshi.
>
> Then do you think the Unicode properties (\p{} and
> \P{}, for example
> \p{Letter}) in the current perl behave as expected
> on EBCDIC?
No they dont behave as expected as is since the data
is wrong.> > I thought at least the test must have a bug, but now > I'm confused. > I wonder if the bug is in tests, in codes, in both, > or nowhere... > > Though I assume that t/uni/class.t has a bug of not > being portable > to EBCDIC and all chr() there should be replaced > with pack 'U*' > (for example: my $str = pack 'U*', 0x20 .. 0x6F), > but I'm not sure how to change it for EBCDIC, as I > can't make sure > of the contents of lib/unicore/lib/*/*.pl locally > built on EBCDIC. You are correct. The test case has bugs (and not the source code). I had modified the test case t/uni/class.t in a couple of places to fix the tests. I have attached the diff output for your reference. Thanks, Rajarshi. > > Regards, > SADAHIRO Tomoyuki > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
diff.out
Description: 4226814380-diff.out
