Changeset 1445

Show
Ignore:
Timestamp:
11/14/07 10:55:33 (7 years ago)
Author:
miyagawa
Message:

added testing of x-sjis-kddi-auto Unicode characters into KDDIJIS. rare case but still works because now we have these mappings in x-sjis-kddi.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Encode-JP-Mobile/trunk/t/kddi-jis.t

    r1434 r1445  
    11use strict; 
    22use warnings; 
    3 use Test::More tests => 17; 
     3use Test::More tests => 25; 
    44use Encode::JP::Mobile; 
    55use Encode::JP::Mobile::KDDIJIS; 
     
    99    my ($jis, $uni, $case) = @_; 
    1010    $case ||= unpack "H*", $uni; 
    11      
     11 
    1212    is decode("x-iso-2022-jp-kddi", $jis), $uni, "decoding $case"; 
    1313    is $jis, encode("x-iso-2022-jp-kddi", $uni), "encoding $case"; 
     14 
     15    # test kddi-auto Unicode chars as well ... rare in reality though 
     16    my $bytes = $jis; 
     17    Encode::from_to($bytes, "x-iso-2022-jp-kddi" => "x-sjis-kddi"); 
     18    Encode::from_to($bytes, "x-sjis-kddi-auto", "x-iso-2022-jp-kddi"); 
     19    is $bytes, $jis, "x-sjis-kddi-auto $case"; 
    1420} 
    1521