X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fcharnames.t;h=669f6e813d6ee43724ac0f31844dfd31b87bb5f1;hb=4984151677c7ba5b0b9f815bc977c0d752cfc430;hp=87e41250046251ba25ad696876cc2f6eee2c1867;hpb=48e3bbddf569369fe6921f305df6ab7290c91152;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/charnames.t b/lib/charnames.t index 87e4125..669f6e8 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -12,7 +12,7 @@ BEGIN { $| = 1; -print "1..37\n"; +print "1..42\n"; use charnames ':full'; @@ -137,7 +137,8 @@ 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 + # Unused Hebrew. + print "not " if defined charnames::viacode(0x0590); print "ok 18\n"; } @@ -181,19 +182,21 @@ print "ok 27\n"; print "not " unless "\N{LF}" eq "\n"; print "ok 28\n"; -print "not " unless "\N{NEXT LINE (NEL)}" eq chr(0x85); +my $nel = ord("A") == 193 ? qr/^(?:\x15|\x25)$/ : qr/^\x85$/; + +print "not " unless "\N{NEXT LINE (NEL)}" =~ $nel; print "ok 29\n"; -print "not " unless "\N{NEXT LINE}" eq chr(0x85); +print "not " unless "\N{NEXT LINE}" =~ $nel; print "ok 30\n"; -print "not " unless "\N{NEL}" eq chr(0x85); +print "not " unless "\N{NEL}" =~ $nel; print "ok 31\n"; -print "not " unless "\N{BYTE ORDER MARK}" eq chr(0xFFFE); +print "not " unless "\N{BYTE ORDER MARK}" eq chr(0xFEFF); print "ok 32\n"; -print "not " unless "\N{BOM}" eq chr(0xFFFE); +print "not " unless "\N{BOM}" eq chr(0xFEFF); print "ok 33\n"; { @@ -214,3 +217,22 @@ print "ok 33\n"; print "ok 37\n"; } +print "not " unless charnames::viacode(0xFEFF) eq "ZERO WIDTH NO-BREAK SPACE"; +print "ok 38\n"; + +{ + use warnings; + print "not " unless ord("\N{BOM}") == 0xFEFF; + print "ok 39\n"; +} + + +print "not " unless ord("\N{ZWNJ}") == 0x200C; +print "ok 40\n"; + +print "not " unless ord("\N{ZWJ}") == 0x200D; +print "ok 41\n"; + +print "not " unless "\N{U+263A}" eq "\N{WHITE SMILING FACE}"; +print "ok 42\n"; +