diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 15:40:13 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 15:40:13 +0000 |
commit | 4e2cda5de1463f636caa8d7626a38efc5bdd4d8d (patch) | |
tree | 367a72f37d2d7d1e00511c3e94fcff702a8af327 /lib/charnames.t | |
parent | 248e172a5c70a92f68eb1fb746fb20e71358b43b (diff) | |
download | perl-4e2cda5de1463f636caa8d7626a38efc5bdd4d8d.tar.gz |
Add simple caches for ::viacode() and ::vianame().
p4raw-id: //depot/perl@13399
Diffstat (limited to 'lib/charnames.t')
-rw-r--r-- | lib/charnames.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/charnames.t b/lib/charnames.t index ce712c36b0..adc4b3f23e 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -8,7 +8,7 @@ BEGIN { } $| = 1; -print "1..20\n"; +print "1..22\n"; use charnames ':full'; @@ -146,3 +146,15 @@ sub to_bytes { defined charnames::vianame("NONE SUCH"); print "ok 20\n"; } + +{ + # check that caching at least hasn't broken anything + + print "not " unless charnames::viacode(0x1234) eq "ETHIOPIC SYLLABLE SEE"; + print "ok 21\n"; + + print "not " unless + sprintf "%04X\n", charnames::vianame("GOTHIC LETTER AHSA") eq "10330"; + print "ok 22\n"; + +} |