summaryrefslogtreecommitdiff
path: root/lib/charnames.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-24 16:12:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-24 16:12:31 +0000
commitdaf0d4939ae7ec91853159e8e5e62c8cae1e0a9f (patch)
treebf37ef8f5d8bc2d35a8ffa93382e2f2bca0cd9b6 /lib/charnames.t
parentf8bef55053427841654eec6e37b8f0f4224b2976 (diff)
downloadperl-daf0d4939ae7ec91853159e8e5e62c8cae1e0a9f.tar.gz
Add charnames::vianame() in case people want to access
the codes in run-time (as opposed to the compile-timeness of \N{...}). p4raw-id: //depot/perl@13237
Diffstat (limited to 'lib/charnames.t')
-rw-r--r--lib/charnames.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/charnames.t b/lib/charnames.t
index cc38221a65..ce712c36b0 100644
--- a/lib/charnames.t
+++ b/lib/charnames.t
@@ -8,7 +8,7 @@ BEGIN {
}
$| = 1;
-print "1..16\n";
+print "1..20\n";
use charnames ':full';
@@ -129,3 +129,20 @@ sub to_bytes {
}
}
+{
+ print "not " unless charnames::viacode(0x1234) eq "ETHIOPIC SYLLABLE SEE";
+ print "ok 17\n";
+
+ print "not " if defined charnames::viacode(0x0590); # unused Hebrew
+ print "ok 18\n";
+}
+
+{
+ print "not " unless
+ sprintf "%04X\n", charnames::vianame("GOTHIC LETTER AHSA") eq "10330";
+ print "ok 19\n";
+
+ print "not " if
+ defined charnames::vianame("NONE SUCH");
+ print "ok 20\n";
+}