root/Net-IDN-Nameprep/trunk/t/01_mapping.t

Revision 319 (checked in by miyagawa, 19 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Test::More tests => 3;
3
4 use Unicode::String;
5 use Net::IDN::Nameprep::Mapping;
6
7 my(@from, @to);
8
9 push @from, '0041'; push @to, [ '0061' ];
10 push @from, '00ad'; push @to, [ ];
11 push @from, '00df'; push @to, [ '0073', '0073' ];
12
13 for my $i (0..$#from) {
14     my $code = hex $from[$i];
15     my @mapped = Net::IDN::Nameprep::Mapping->mapping($code);
16     my @output = map { hex } @{$to[$i]};
17     ok eq_array(\@mapped, \@output);
18 }
Note: See TracBrowser for help on using the browser.