Show
Ignore:
Timestamp:
01/18/08 12:04:44 (7 years ago)
Author:
tokuhirom
Message:

lang/perl/HTTP-MobileAgent?-Plugin-Charset: refactoring

Location:
lang/perl/HTTP-MobileAgent-Plugin-Charset/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-MobileAgent-Plugin-Charset/trunk/Makefile.PL

    r4173 r4851  
    33all_from 'lib/HTTP/MobileAgent/Plugin/Charset.pm'; 
    44 
    5 requires $_ for (qw/ /); 
     5requires 'HTTP::MobileAgent' => '0.27'; 
    66 
    77build_requires 'Test::More'; 
  • lang/perl/HTTP-MobileAgent-Plugin-Charset/trunk/t/01_can_display_utf8.t

    r4189 r4851  
    88 
    99filters { 
    10     input => [qw/can_display_utf8/], 
     10    input => [qw/filt/], 
     11    expected => [qw/yaml/], 
    1112}; 
    1213 
    13 run_is input => 'expected'; 
     14run_is_deeply input => 'expected'; 
    1415 
    15 sub can_display_utf8 { 
     16sub filt { 
    1617    my $ua = shift; 
    1718 
     
    2425          : 'shift_jis; q=0.6, *;q=0.1'; 
    2526    } 
     27 
    2628    my $agent = HTTP::MobileAgent->new; 
    27     $agent->can_display_utf8 ? 'utf8' : 'no utf8'; 
     29    +{ 
     30        can_display_utf8 => $agent->can_display_utf8 ? 'utf8' : 'no utf8', 
     31    }; 
    2832} 
    2933 
     
    3236=== 
    3337--- input: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.8) Gecko/20071019 Firefox/2.0.0.8 
    34 --- expected: utf8 
     38--- expected 
     39can_display_utf8: utf8 
    3540 
    3641=== docomo foma 
    3742--- input: DoCoMo/2.0 N905iBiz(c100;TJ) 
    38 --- expected: utf8 
     43--- expected 
     44can_display_utf8: utf8 
    3945 
    4046=== docomo mova 
    4147--- input: DoCoMo/1.0/D501i 
    42 --- expected: no utf8 
     48--- expected 
     49can_display_utf8: no utf8 
    4350 
    4451===  
    4552--- input: Vodafone/1.0/V802SE/SEJ001/SNXXXXXXXXX Browser/SEMC-Browser/4.1 Profile/MIDP-2.0 Configuration/CLDC-1.10 
    46 --- expected: utf8 
     53--- expected 
     54can_display_utf8: utf8 
    4755 
    4856=== 
    4957--- input: J-PHONE/2.0/J-DN02 
    50 --- expected: no utf8 
     58--- expected 
     59can_display_utf8: no utf8 
    5160 
    5261=== willcom 
    5362--- input: Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0 
    54 --- expected: no utf8 
     63--- expected 
     64can_display_utf8: no utf8 
    5565 
    5666=== willcom 
    5767--- input: Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0 
    58 --- expected: utf8 
     68--- expected 
     69can_display_utf8: utf8 
    5970 
    6071=== ez 
    6172--- input: UP.Browser/3.01-HI01 UP.Link/3.4.5.2 
    62 --- expected: no utf8 
     73--- expected 
     74can_display_utf8: no utf8 
    6375 
    6476=== ez 
    6577--- input: KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1 
    66 --- expected: utf8 
     78--- expected 
     79can_display_utf8: utf8 
    6780