[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re[2]: [mp2] 1.99_16 Test 'apache/util.t' falied with locale ru_RU.utf8
From:       Dmitry Tsigelnik <tsigelnik () silverpoint ! com ! ua>
Date:       2004-08-31 13:39:14
Message-ID: 1812672096.20040831163914 () silverpoint ! com ! ua
[Download RAW message or body]

Здравствуйте, Stas.

 ы писали 30 августа 2004 г., 20:25:14:

[...]
> > 
> > 
> > I changed \w+ on \S+ and all test ok.
> > I think this is bug of perl5.8.0 as Unicode not fully supported

SB> I guess that can work. But 5.8.0 seems to work fine for me. Here are some
SB> examples:

SB> perl-5.6.2  -le '$x = "\x{0417}\x{0430}"; print $x =~ /\w/ ? "OK" : "NOT OK";'
SB> NOT OK

SB> perl-5.8.0 -le '$x = "\x{0417}\x{0430}"; print $x =~ /\w/ ? "OK" : "NOT OK";'
SB> OK

This work fine!

SB> Do they work for you? if yes, please post here an encoded string that it
SB> has failed to match. The debug output is mungled A? is not a proper
SB> string. you can encode it with Encode::encode("utf8", $x).


I chanched code like this, because Encode::encode not help:

    my($fmtdate, $time, $comment, $exact_match) = @_;

    if ($parse_time_ok && $exact_match) {
        my $ptime = APR::Date::parse_http($fmtdate);
        t_debug "fmtdate: $fmtdate";
        ok t_cmp $ptime, $time, $comment;
    }
    else {
                
                
                use Data::Dumper;
                print "\n".Dumper($fmtdate)."\n";
                
                print "\n: \\".join("\\",unpack('U*',$fmtdate))."\n\n";
                
        ok t_cmp $fmtdate_ptn, $fmtdate, $comment;
    }
}

-----------------
and i receive this:

t/apache/util....1..8
# Running under perl version 5.008 for linux
# Current time local: Tue Aug 31 15:50:32 2004
# Current time GMT:   Tue Aug 31 12:50:32 2004
# Using Test.pm version 1.23
# Using Apache/Test.pm version 1.14

$VAR1 = 'A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT';


 \208\146\209\130\209\128\44\32\51\49\32\208\144\208\178\208\179\32\50\48\48\52\32\49\50\58\53\49\58\48\52\32\71\77\84


# WARNING!!! t_cmp() argument order has changed.
# use of a regular expression as the first argument
# is deprecated.  support will be removed soon.
# testing : Apache::Util::ht_time($pool)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT
not ok 1

$VAR1 = 'A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT';


 \208\146\209\130\209\128\44\32\51\49\32\208\144\208\178\208\179\32\50\48\48\52\32\49\50\58\53\49\58\48\52\32\71\77\84


# WARNING!!! t_cmp() argument order has changed.
# use of a regular expression as the first argument
# is deprecated.  support will be removed soon.
# testing : Apache::Util::ht_time($pool, $time)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT
not ok 2

$VAR1 = 'A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT';


 \208\146\209\130\209\128\44\32\51\49\32\208\144\208\178\208\179\32\50\48\48\52\32\49\50\58\53\49\58\48\52\32\71\77\84


# WARNING!!! t_cmp() argument order has changed.
# use of a regular expression as the first argument
# is deprecated.  support will be removed soon.
# testing : Apache::Util::ht_time($pool, $time, $fmt)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 12:51:04 GMT
not ok 3

$VAR1 = 'A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 15:51:04 EEST';


 \208\146\209\130\209\128\44\32\51\49\32\208\144\208\178\208\179\32\50\48\48\52\32\49\53\58\53\49\58\48\52\32\69\69\83\84


# WARNING!!! t_cmp() argument order has changed.
# use of a regular expression as the first argument
# is deprecated.  support will be removed soon.
# testing : Apache::Util::ht_time($pool, $time, $fmt, $gmt)
# expected: (?-xism:^\w+, \d\d \w+ \d\d\d\d \d\d:\d\d:\d\d)
# received: A?A?A?A?A?A?, 31 A?A?A?A?A?A? 2004 15:51:04 EEST
not ok 4
# testing : Apache::Util::escape_path / partial=1 / default
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 5
# testing : Apache::Util::escape_path / partial=1 / explicit
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 6
# testing : Apache::Util::escape_path / partial=0
# expected: a%20'long'%20file%3f.html
# received: a%20'long'%20file%3f.html
ok 7
# testing : Apache::Util::escape_path / partial=0 / ./ prefix
# expected: ./a%20'long'%20file%3f.html:
# received: ./a%20'long'%20file%3f.html:
ok 8
FAILED tests 1-4
        Failed 4/8 tests, 50.00% okay
Failed Test     Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/apache/util.t                8    4  50.00%  1-4
Failed 1/1 test scripts, 0.00% okay. 4/8 subtests failed, 50.00% okay.



-- 
С уважением,
 Dmitry                          mailto:tsigelnik@silverpoint.com.ua


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic