diff options
Diffstat (limited to 't')
-rw-r--r-- | t/charset_tools.pl | 4 | ||||
-rw-r--r-- | t/op/chop.t | 2 | ||||
-rw-r--r-- | t/op/index.t | 4 | ||||
-rw-r--r-- | t/op/lc.t | 6 | ||||
-rw-r--r-- | t/re/pat_advanced.t | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/t/charset_tools.pl b/t/charset_tools.pl index 6d70a37cab..0621a7ae96 100644 --- a/t/charset_tools.pl +++ b/t/charset_tools.pl @@ -8,7 +8,7 @@ $::IS_EBCDIC = ord 'A' == 193; # the set of 256 characters which is usually called Latin1. However, they # will work properly with any character input, not just Latin1. -sub native_to_latin1($) { +sub native_to_uni($) { my $string = shift; return $string if $::IS_ASCII; @@ -23,7 +23,7 @@ sub native_to_latin1($) { return $output; } -sub latin1_to_native($) { +sub uni_to_native($) { my $string = shift; return $string if $::IS_ASCII; diff --git a/t/op/chop.t b/t/op/chop.t index 827eb82e81..91c4fbe58f 100644 --- a/t/op/chop.t +++ b/t/op/chop.t @@ -183,7 +183,7 @@ ok($@ =~ /Can\'t modify.*chop.*in.*assignment/); eval 'chomp($x, $y) = (1, 2);'; ok($@ =~ /Can\'t modify.*chom?p.*in.*assignment/); -my @chars = ("N", latin1_to_native("\xd3"), substr ("\xd4\x{100}", 0, 1), chr 1296); +my @chars = ("N", uni_to_native("\xd3"), substr ("\xd4\x{100}", 0, 1), chr 1296); foreach my $start (@chars) { foreach my $end (@chars) { local $/ = $end; diff --git a/t/op/index.t b/t/op/index.t index 29a477146e..243cc1bff6 100644 --- a/t/op/index.t +++ b/t/op/index.t @@ -93,8 +93,8 @@ is(rindex($a, "foo", ), 0); { my $search; my $text; - $search = "foo " . latin1_to_native("\xc9") . " bar"; - $text = "a" . latin1_to_native("\xa3\xa3") . "a $search $search quux"; + $search = "foo " . uni_to_native("\xc9") . " bar"; + $text = "a" . uni_to_native("\xa3\xa3") . "a $search $search quux"; my $text_utf8 = $text; utf8::upgrade($text_utf8); @@ -108,13 +108,13 @@ is(fc($b) , "\x{101}\x{101}aa", 'fc'); # \x{149} is LATIN SMALL LETTER N PRECEDED BY APOSTROPHE, its uppercase is # \x{2BC}\x{E4} or MODIFIER LETTER APOSTROPHE and N. -is(latin1_to_native("\U\x{DF}aB\x{149}cD"), latin1_to_native("SSAB\x{2BC}NCD"), +is(uni_to_native("\U\x{DF}aB\x{149}cD"), uni_to_native("SSAB\x{2BC}NCD"), "multicharacter uppercase"); # The \x{DF} is its own lowercase, ditto for \x{149}. # There are no single character -> multiple characters lowercase mappings. -is(latin1_to_native("\L\x{DF}aB\x{149}cD"), latin1_to_native("\x{DF}ab\x{149}cd"), +is(uni_to_native("\L\x{DF}aB\x{149}cD"), uni_to_native("\x{DF}ab\x{149}cd"), "multicharacter lowercase"); # \x{DF} is LATIN SMALL LETTER SHARP S, its foldcase is ss or \x{73}\x{73}; @@ -122,7 +122,7 @@ is(latin1_to_native("\L\x{DF}aB\x{149}cD"), latin1_to_native("\x{DF}ab\x{149}cd" # \x{2BC}\x{6E} or MODIFIER LETTER APOSTROPHE and n. # Note that is this further tested in t/uni/fold.t -is(latin1_to_native("\F\x{DF}aB\x{149}cD"), latin1_to_native("ssab\x{2BC}ncd"), +is(uni_to_native("\F\x{DF}aB\x{149}cD"), uni_to_native("ssab\x{2BC}ncd"), "multicharacter foldcase"); diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t index 19d6fbce07..e03b2f4aca 100644 --- a/t/re/pat_advanced.t +++ b/t/re/pat_advanced.t @@ -1047,7 +1047,7 @@ sub run_tests { undef $w; my $Cedilla_Latin1 = "GAR" - . latin1_to_native("\xC7") + . uni_to_native("\xC7") . "ON"; my $Cedilla_utf8 = $Cedilla_Latin1; utf8::upgrade($Cedilla_utf8); @@ -1060,9 +1060,9 @@ sub run_tests { undef $w; my $NBSP_Latin1 = "NBSP" - . latin1_to_native("\xA0") + . uni_to_native("\xA0") . "SEPARATED" - . latin1_to_native("\xA0") + . uni_to_native("\xA0") . "SPACE"; my $NBSP_utf8 = $NBSP_Latin1; utf8::upgrade($NBSP_utf8); |