diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-28 16:20:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-28 16:20:03 +0000 |
commit | 52ea3e69a0eb35af2d24bda5dabccf9b9600bfe4 (patch) | |
tree | b5ce0317ddfc1eb5c4e4dc05e20c513d761bad04 /lib/charnames.t | |
parent | 8a22007576b03a2f42861e49c20ebb363ff4ba58 (diff) | |
download | perl-52ea3e69a0eb35af2d24bda5dabccf9b9600bfe4.tar.gz |
Support Unicode 3.1 names, names without the (XX), and BOM.
p4raw-id: //depot/perl@15585
Diffstat (limited to 'lib/charnames.t')
-rw-r--r-- | lib/charnames.t | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/lib/charnames.t b/lib/charnames.t index c800128efc..a8a063f096 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -1,15 +1,18 @@ #!./perl +my @WARN; + BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; @INC = '../lib'; } + $SIG{__WARN__} = sub { push @WARN, @_ }; } $| = 1; -print "1..25\n"; +print "1..34\n"; use charnames ':full'; @@ -169,6 +172,36 @@ print "ok 24\n"; print "not " unless "\N{NULL}" eq "\c@"; print "ok 25\n"; -# TODO: support 3.1 names, BOM. Generic aliasing? +print "not " unless "\N{LINE FEED (LF)}" eq "\n"; +print "ok 26\n"; + +print "not " unless "\N{LINE FEED}" eq "\n"; +print "ok 27\n"; + +print "not " unless "\N{LF}" eq "\n"; +print "ok 28\n"; + +print "not " unless "\N{BYTE ORDER MARK}" eq chr(0xFFFE); +print "ok 29\n"; + +print "not " unless "\N{BOM}" eq chr(0xFFFE); +print "ok 30\n"; + +{ + use warnings 'deprecated'; + + print "not " unless "\N{HORIZONTAL TABULATION}" eq "\t"; + print "ok 31\n"; + + print "not " unless grep { /"HORIZONTAL TABULATION" is deprecated/ } @WARN; + print "ok 32\n"; + no warnings 'deprecated'; + + print "not " unless "\N{VERTICAL TABULATION}" eq "\013"; + print "ok 33\n"; + + print "not " if grep { /"VERTICAL TABULATION" is deprecated/ } @WARN; + print "ok 34\n"; +} |