This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
test.pl: Add native to uni ord fcns
authorKarl Williamson <public@khwilliamson.com>
Sun, 28 Nov 2010 05:08:57 +0000 (22:08 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 28 Nov 2010 12:49:16 +0000 (04:49 -0800)
t/test.pl

index 42b84cd..bfda110 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -1129,4 +1129,17 @@ sub latin1_to_native($) {
     return $string;
 }
 
+sub ord_latin1_to_native {
+    # given an input latin1 code point, return the platform's native
+    # equivalent value
+
+    return ord latin1_to_native(chr $_[0]);
+}
+
+sub ord_native_to_latin1 {
+    # given an input platform code point, return the latin1 equivalent value
+
+    return ord native_to_latin1(chr $_[0]);
+}
+
 1;