summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-05-26 20:34:06 -0600
committerKarl Williamson <khw@cpan.org>2014-05-31 10:08:19 -0600
commit6deb7a5e3707524fd23c0080d6a762ff30e50494 (patch)
tree7dbc0f10f4184d131c021750cb3cda92c6a5f741 /t/uni
parenta08d8f37be94aca8ba15add2c576382bb9f818c4 (diff)
downloadperl-6deb7a5e3707524fd23c0080d6a762ff30e50494.tar.gz
Use already existing functions in some .t files
I invented 2 functions for use in .t files a while back that turn out to be duplicates of (undocumented) functions that already existed suitable for general use. This commit changes to use those general functions and removes the copies from t/test.pl. (I plan to document these functions later in 5.21.). This is in preparation for moving some similar functions from t/test.pl to a newly created test tools file, as it turns out that these functions are useful in .t files that don't use t/test.pl, but instead, e.g., Test::More.
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/class.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/uni/class.t b/t/uni/class.t
index 144ae4334d..ab21b02de9 100644
--- a/t/uni/class.t
+++ b/t/uni/class.t
@@ -6,7 +6,8 @@ BEGIN {
plan tests => 11;
-my $str = join "", map latin1_to_native(chr($_)), 0x20 .. 0x6F;
+
+my $str = join "", map { chr utf8::unicode_to_native($_) } 0x20 .. 0x6F;
is(($str =~ /(\p{IsMyUniClass}+)/)[0], '0123456789:;<=>?@ABCDEFGHIJKLMNO',
'user-defined class compiled before defined');