in reply to Undecipherable t/re/uniprops02.t failures on recent builds of perl.

G'day Rob,

Note: I've used a common alias of mine below.

$ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E +'

There are only a limited number of "Numeric_Value" values. They can be positive, negative and fractional but 3.12e-03 is not one of them. In perluniprops, a search for "Numeric_Value" finds 146 matches. Some examples (in spoiler):

See [PDF] "4.6 Numeric Value" from the Unicode specification.

Here's a quick script you can use to check code points:

#!/usr/bin/env perl use strict; use warnings; use Unicode::UCD 'charprop'; for my $char (0, 1, ' ', 'a', "\n") { print "Char '$char'\n"; my $code_point = ord $char; print 'Numeric_Type: ', charprop($code_point, 'Numeric_Type'), "\ +n"; print 'Numeric_Value: ', charprop($code_point, 'Numeric_Value'), +"\n"; print '-' x 40, "\n"; }

Output (in spoiler):

Char '0' Numeric_Type: Decimal Numeric_Value: 0 ---------------------------------------- Char '1' Numeric_Type: Decimal Numeric_Value: 1 ---------------------------------------- Char ' ' Numeric_Type: None Numeric_Value: NaN ---------------------------------------- Char 'a' Numeric_Type: None Numeric_Value: NaN ---------------------------------------- Char ' ' Numeric_Type: None Numeric_Value: NaN ----------------------------------------

That might be sufficient information for your needs. I was going to look in "lib/unicore/TestProp.pl" but I can't locate it: I tried https://github.com/Perl/perl5/tree/blead/lib/unicore, https://github.com/Perl/perl5/tree/maint-5.34/lib/unicore, and ran `find /home/ken/perl5/perlbrew/perls/ -iname TestProp.pl` on my computer. If you want, and provide a link, I'll be happy to check it out.

— Ken

Replies are listed 'Best First'.
Re^2: Undecipherable t/re/uniprops02.t failures on recent builds of perl.
by syphilis (Archbishop) on Apr 09, 2022 at 01:38 UTC
    Thanks Ken.
    The info you've provided looks very helpful, and I'm about to start utilising it in investigating further.
    It's probably just some bug in the way doubledoubles are assigned (or being read), but I think it's about time I at least worked out what is going on.

    I was going to look in "lib/unicore/TestProp.pl" but I can't locate it

    Comments at the start of TestProp.pl inform us that it is machine-generated by ..\lib\unicore\mktables from the Unicode database, Version 14.0.0.
    I guess this would be done during the "make" (or perhaps "make test") stage.

    I'll post again later - once I've done some digging.

    Cheers,
    Rob