Commit | Line | Data |
---|---|---|
423cee85 JH |
1 | #!./perl |
2 | ||
52ea3e69 JH |
3 | my @WARN; |
4 | ||
423cee85 JH |
5 | BEGIN { |
6 | unless(grep /blib/, @INC) { | |
7 | chdir 't' if -d 't'; | |
20822f61 | 8 | @INC = '../lib'; |
143a3e5e | 9 | require './test.pl'; |
423cee85 | 10 | } |
52ea3e69 | 11 | $SIG{__WARN__} = sub { push @WARN, @_ }; |
423cee85 JH |
12 | } |
13 | ||
63c6dcc1 JH |
14 | require File::Spec; |
15 | ||
423cee85 | 16 | $| = 1; |
822ebcc8 | 17 | |
51cf30b6 | 18 | print "1..73\n"; |
423cee85 JH |
19 | |
20 | use charnames ':full'; | |
21 | ||
93979888 | 22 | print "not " unless "Here\N{EXCLAMATION MARK}?" eq "Here!?"; |
423cee85 JH |
23 | print "ok 1\n"; |
24 | ||
c82a54e6 | 25 | { |
5d9a6404 | 26 | use bytes; # TEST -utf8 can switch utf8 on |
c82a54e6 IZ |
27 | |
28 | print "# \$res=$res \$\@='$@'\nnot " | |
29 | if $res = eval <<'EOE' | |
423cee85 | 30 | use charnames ":full"; |
4a2d328f | 31 | "Here: \N{CYRILLIC SMALL LETTER BE}!"; |
423cee85 JH |
32 | 1 |
33 | EOE | |
c82a54e6 IZ |
34 | or $@ !~ /above 0xFF/; |
35 | print "ok 2\n"; | |
36 | # print "# \$res=$res \$\@='$@'\n"; | |
423cee85 | 37 | |
c82a54e6 IZ |
38 | print "# \$res=$res \$\@='$@'\nnot " |
39 | if $res = eval <<'EOE' | |
423cee85 | 40 | use charnames 'cyrillic'; |
4a2d328f | 41 | "Here: \N{Be}!"; |
423cee85 JH |
42 | 1 |
43 | EOE | |
c82a54e6 IZ |
44 | or $@ !~ /CYRILLIC CAPITAL LETTER BE.*above 0xFF/; |
45 | print "ok 3\n"; | |
46 | } | |
423cee85 JH |
47 | |
48 | # If octal representation of unicode char is \0xyzt, then the utf8 is \3xy\2zt | |
210db7fc PP |
49 | if (ord('A') == 65) { # as on ASCII or UTF-8 machines |
50 | $encoded_be = "\320\261"; | |
51 | $encoded_alpha = "\316\261"; | |
52 | $encoded_bet = "\327\221"; | |
53 | $encoded_deseng = "\360\220\221\215"; | |
54 | } | |
55 | else { # EBCDIC where UTF-EBCDIC may be used (this may be 1047 specific since | |
56 | # UTF-EBCDIC is codepage specific) | |
57 | $encoded_be = "\270\102\130"; | |
58 | $encoded_alpha = "\264\130"; | |
59 | $encoded_bet = "\270\125\130"; | |
60 | $encoded_deseng = "\336\102\103\124"; | |
61 | } | |
c5cc3500 GS |
62 | |
63 | sub to_bytes { | |
f9a63242 | 64 | pack"a*", shift; |
c5cc3500 GS |
65 | } |
66 | ||
423cee85 JH |
67 | { |
68 | use charnames ':full'; | |
423cee85 | 69 | |
c5cc3500 | 70 | print "not " unless to_bytes("\N{CYRILLIC SMALL LETTER BE}") eq $encoded_be; |
423cee85 JH |
71 | print "ok 4\n"; |
72 | ||
73 | use charnames qw(cyrillic greek :short); | |
74 | ||
c5cc3500 | 75 | print "not " unless to_bytes("\N{be},\N{alpha},\N{hebrew:bet}") |
423cee85 JH |
76 | eq "$encoded_be,$encoded_alpha,$encoded_bet"; |
77 | print "ok 5\n"; | |
78 | } | |
e1992b6d GS |
79 | |
80 | { | |
81 | use charnames ':full'; | |
82 | print "not " unless "\x{263a}" eq "\N{WHITE SMILING FACE}"; | |
83 | print "ok 6\n"; | |
84 | print "not " unless length("\x{263a}") == 1; | |
85 | print "ok 7\n"; | |
86 | print "not " unless length("\N{WHITE SMILING FACE}") == 1; | |
87 | print "ok 8\n"; | |
88 | print "not " unless sprintf("%vx", "\x{263a}") eq "263a"; | |
89 | print "ok 9\n"; | |
90 | print "not " unless sprintf("%vx", "\N{WHITE SMILING FACE}") eq "263a"; | |
91 | print "ok 10\n"; | |
f08d6ad9 GS |
92 | print "not " unless sprintf("%vx", "\xFF\N{WHITE SMILING FACE}") eq "ff.263a"; |
93 | print "ok 11\n"; | |
94 | print "not " unless sprintf("%vx", "\x{ff}\N{WHITE SMILING FACE}") eq "ff.263a"; | |
95 | print "ok 12\n"; | |
e1992b6d | 96 | } |
c00525d4 SP |
97 | |
98 | { | |
99 | use charnames qw(:full); | |
55eda711 | 100 | use utf8; |
51cf30b6 | 101 | |
c00525d4 SP |
102 | my $x = "\x{221b}"; |
103 | my $named = "\N{CUBE ROOT}"; | |
104 | ||
105 | print "not " unless ord($x) == ord($named); | |
106 | print "ok 13\n"; | |
107 | } | |
108 | ||
f9a63242 JH |
109 | { |
110 | use charnames qw(:full); | |
55eda711 | 111 | use utf8; |
f9a63242 JH |
112 | print "not " unless "\x{100}\N{CENT SIGN}" eq "\x{100}"."\N{CENT SIGN}"; |
113 | print "ok 14\n"; | |
114 | } | |
115 | ||
b896c7a5 A |
116 | { |
117 | use charnames ':full'; | |
118 | ||
119 | print "not " | |
120 | unless to_bytes("\N{DESERET SMALL LETTER ENG}") eq $encoded_deseng; | |
121 | print "ok 15\n"; | |
4765795a | 122 | } |
b896c7a5 | 123 | |
4765795a | 124 | { |
51cf30b6 | 125 | # 20001114.001 |
4765795a | 126 | |
4c53e876 | 127 | no utf8; # naked Latin-1 |
3ba0e062 | 128 | |
4765795a JH |
129 | if (ord("Ä") == 0xc4) { # Try to do this only on Latin-1. |
130 | use charnames ':full'; | |
131 | my $text = "\N{LATIN CAPITAL LETTER A WITH DIAERESIS}"; | |
132 | print "not " unless $text eq "\xc4" && ord($text) == 0xc4; | |
133 | print "ok 16\n"; | |
134 | } else { | |
135 | print "ok 16 # Skip: not Latin-1\n"; | |
136 | } | |
b896c7a5 A |
137 | } |
138 | ||
daf0d493 JH |
139 | { |
140 | print "not " unless charnames::viacode(0x1234) eq "ETHIOPIC SYLLABLE SEE"; | |
141 | print "ok 17\n"; | |
142 | ||
a23c04e4 | 143 | # Unused Hebrew. |
11881cb4 | 144 | print "not " if defined charnames::viacode(0x0590); |
daf0d493 JH |
145 | print "ok 18\n"; |
146 | } | |
147 | ||
148 | { | |
149 | print "not " unless | |
51b0dbc4 | 150 | sprintf("%04X", charnames::vianame("GOTHIC LETTER AHSA")) eq "10330"; |
daf0d493 JH |
151 | print "ok 19\n"; |
152 | ||
153 | print "not " if | |
154 | defined charnames::vianame("NONE SUCH"); | |
155 | print "ok 20\n"; | |
156 | } | |
4e2cda5d JH |
157 | |
158 | { | |
159 | # check that caching at least hasn't broken anything | |
160 | ||
161 | print "not " unless charnames::viacode(0x1234) eq "ETHIOPIC SYLLABLE SEE"; | |
162 | print "ok 21\n"; | |
163 | ||
164 | print "not " unless | |
51b0dbc4 | 165 | sprintf("%04X", charnames::vianame("GOTHIC LETTER AHSA")) eq "10330"; |
4e2cda5d JH |
166 | print "ok 22\n"; |
167 | ||
168 | } | |
301a3cda | 169 | |
822ebcc8 | 170 | print "not " unless "\N{CHARACTER TABULATION}" eq "\t"; |
301a3cda JH |
171 | print "ok 23\n"; |
172 | ||
173 | print "not " unless "\N{ESCAPE}" eq "\e"; | |
174 | print "ok 24\n"; | |
175 | ||
176 | print "not " unless "\N{NULL}" eq "\c@"; | |
177 | print "ok 25\n"; | |
178 | ||
eb380778 JH |
179 | if ($^O eq 'MacOS') |
180 | { | |
181 | print "not " unless "\N{CARRIAGE RETURN (CR)}" eq "\n"; | |
182 | print "ok 26\n"; | |
183 | ||
184 | print "not " unless "\N{CARRIAGE RETURN}" eq "\n"; | |
185 | print "ok 27\n"; | |
186 | ||
187 | print "not " unless "\N{CR}" eq "\n"; | |
188 | print "ok 28\n"; | |
189 | } | |
190 | else | |
191 | { | |
192 | print "not " unless "\N{LINE FEED (LF)}" eq "\n"; | |
193 | print "ok 26\n"; | |
52ea3e69 | 194 | |
eb380778 JH |
195 | print "not " unless "\N{LINE FEED}" eq "\n"; |
196 | print "ok 27\n"; | |
52ea3e69 | 197 | |
eb380778 JH |
198 | print "not " unless "\N{LF}" eq "\n"; |
199 | print "ok 28\n"; | |
200 | } | |
52ea3e69 | 201 | |
a2e77dd4 JH |
202 | my $nel = ord("A") == 193 ? qr/^(?:\x15|\x25)$/ : qr/^\x85$/; |
203 | ||
204 | print "not " unless "\N{NEXT LINE (NEL)}" =~ $nel; | |
52ea3e69 JH |
205 | print "ok 29\n"; |
206 | ||
a2e77dd4 | 207 | print "not " unless "\N{NEXT LINE}" =~ $nel; |
52ea3e69 JH |
208 | print "ok 30\n"; |
209 | ||
a2e77dd4 | 210 | print "not " unless "\N{NEL}" =~ $nel; |
51e9e896 PN |
211 | print "ok 31\n"; |
212 | ||
274085e3 | 213 | print "not " unless "\N{BYTE ORDER MARK}" eq chr(0xFEFF); |
51e9e896 PN |
214 | print "ok 32\n"; |
215 | ||
d7d589a8 | 216 | print "not " unless "\N{BOM}" eq chr(0xFEFF); |
51e9e896 PN |
217 | print "ok 33\n"; |
218 | ||
52ea3e69 JH |
219 | { |
220 | use warnings 'deprecated'; | |
221 | ||
222 | print "not " unless "\N{HORIZONTAL TABULATION}" eq "\t"; | |
51e9e896 | 223 | print "ok 34\n"; |
52ea3e69 JH |
224 | |
225 | print "not " unless grep { /"HORIZONTAL TABULATION" is deprecated/ } @WARN; | |
51e9e896 | 226 | print "ok 35\n"; |
822ebcc8 | 227 | |
52ea3e69 JH |
228 | no warnings 'deprecated'; |
229 | ||
230 | print "not " unless "\N{VERTICAL TABULATION}" eq "\013"; | |
51e9e896 | 231 | print "ok 36\n"; |
52ea3e69 JH |
232 | |
233 | print "not " if grep { /"VERTICAL TABULATION" is deprecated/ } @WARN; | |
51e9e896 | 234 | print "ok 37\n"; |
52ea3e69 | 235 | } |
822ebcc8 | 236 | |
274085e3 | 237 | print "not " unless charnames::viacode(0xFEFF) eq "ZERO WIDTH NO-BREAK SPACE"; |
a23c04e4 JH |
238 | print "ok 38\n"; |
239 | ||
872c91ae JH |
240 | { |
241 | use warnings; | |
242 | print "not " unless ord("\N{BOM}") == 0xFEFF; | |
243 | print "ok 39\n"; | |
244 | } | |
245 | ||
24b5d5cc JH |
246 | print "not " unless ord("\N{ZWNJ}") == 0x200C; |
247 | print "ok 40\n"; | |
248 | ||
249 | print "not " unless ord("\N{ZWJ}") == 0x200D; | |
250 | print "ok 41\n"; | |
dbc0d4f2 JH |
251 | |
252 | print "not " unless "\N{U+263A}" eq "\N{WHITE SMILING FACE}"; | |
253 | print "ok 42\n"; | |
254 | ||
51b0dbc4 TS |
255 | { |
256 | print "not " unless | |
257 | 0x3093 == charnames::vianame("HIRAGANA LETTER N"); | |
258 | print "ok 43\n"; | |
259 | ||
260 | print "not " unless | |
261 | 0x0397 == charnames::vianame("GREEK CAPITAL LETTER ETA"); | |
262 | print "ok 44\n"; | |
263 | } | |
264 | ||
00d835f2 | 265 | print "not " if defined charnames::viacode(0x110000); |
51b0dbc4 | 266 | print "ok 45\n"; |
00d835f2 JH |
267 | |
268 | print "not " if grep { /you asked for U+110000/ } @WARN; | |
51b0dbc4 | 269 | print "ok 46\n"; |
35c0985d MB |
270 | |
271 | ||
272 | # ---- Alias extensions | |
273 | ||
274 | my $tmpfile = "tmp0000"; | |
63c6dcc1 | 275 | my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore xyzzy_alias.pl)); |
35c0985d MB |
276 | my $i = 0; |
277 | 1 while -e ++$tmpfile; | |
278 | END { if ($tmpfile) { 1 while unlink $tmpfile; } } | |
279 | ||
280 | my @prgs; | |
281 | { local $/ = undef; | |
282 | @prgs = split "\n########\n", <DATA>; | |
283 | } | |
284 | ||
285 | my $i = 46; | |
286 | for (@prgs) { | |
287 | my ($code, $exp) = ((split m/\nEXPECT\n/), '$'); | |
288 | my ($prog, $fil) = ((split m/\nFILE\n/, $code), ""); | |
289 | open my $tmp, "> $tmpfile" or die "Could not open $tmpfile: $!"; | |
290 | print $tmp $prog, "\n"; | |
291 | close $tmp or die "Could not close $tmpfile: $!"; | |
292 | if ($fil) { | |
293 | $fil .= "\n"; | |
294 | open my $ali, "> $alifile" or die "Could not open $alifile: $!"; | |
295 | print $ali $fil; | |
296 | close $ali or die "Could not close $alifile: $!"; | |
297 | } | |
143a3e5e CB |
298 | my $res = runperl( switches => $switch, |
299 | progfile => $tmpfile, | |
300 | stderr => 1 ); | |
35c0985d MB |
301 | my $status = $?; |
302 | $res =~ s/[\r\n]+$//; | |
303 | $res =~ s/tmp\d+/-/g; # fake $prog from STDIN | |
304 | $res =~ s/\n%[A-Z]+-[SIWEF]-.*$// # clip off DCL status msg | |
305 | if $^O eq "VMS"; | |
306 | $exp =~ s/[\r\n]+$//; | |
307 | if ($^O eq "MacOS") { | |
308 | $exp =~ s{(\./)?abc\.pm}{:abc.pm}g; | |
309 | $exp =~ s{./abc} {:abc}g; | |
310 | } | |
311 | my $pfx = ($res =~ s/^PREFIX\n//); | |
312 | my $rexp = qr{^$exp}; | |
313 | if ($res =~ s/^SKIPPED\n//) { | |
314 | print "$results\n"; | |
315 | } | |
316 | elsif (($pfx and $res !~ /^\Q$expected/) or | |
317 | (!$pfx and $res !~ $rexp)) { | |
318 | print STDERR | |
319 | "PROG:\n$prog\n", | |
320 | "FILE:\n$fil", | |
321 | "EXPECTED:\n$exp\n", | |
322 | "GOT:\n$res\n"; | |
323 | print "not "; | |
324 | } | |
325 | print "ok ", ++$i, "\n"; | |
326 | 1 while unlink $tmpfile; | |
327 | $fil or next; | |
328 | 1 while unlink $alifile; | |
329 | } | |
330 | ||
331 | __END__ | |
51cf30b6 MB |
332 | # unsupported pragma |
333 | use charnames ":scoobydoo"; | |
334 | "Here: \N{e_ACUTE}!\n"; | |
335 | EXPECT | |
336 | unsupported special ':scoobydoo' in charnames at | |
337 | ######## | |
35c0985d MB |
338 | # wrong type of alias (missing colon) |
339 | use charnames "alias"; | |
340 | "Here: \N{e_ACUTE}!\n"; | |
341 | EXPECT | |
51cf30b6 | 342 | Unknown charname 'e_ACUTE' at |
35c0985d MB |
343 | ######## |
344 | # alias without an argument | |
345 | use charnames ":alias"; | |
346 | "Here: \N{e_ACUTE}!\n"; | |
347 | EXPECT | |
51cf30b6 MB |
348 | :alias needs an argument in charnames at |
349 | ######## | |
350 | # reversed sequence | |
351 | use charnames ":alias" => ":full"; | |
352 | "Here: \N{e_ACUTE}!\n"; | |
353 | EXPECT | |
354 | :alias cannot use existing pragma :full \(reversed order\?\) at | |
35c0985d MB |
355 | ######## |
356 | # alias with hashref but no :full | |
357 | use charnames ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" }; | |
358 | "Here: \N{e_ACUTE}!\n"; | |
359 | EXPECT | |
360 | Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at | |
361 | ######## | |
362 | # alias with hashref but with :short | |
363 | use charnames ":short", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" }; | |
364 | "Here: \N{e_ACUTE}!\n"; | |
365 | EXPECT | |
366 | Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at | |
367 | ######## | |
368 | # alias with hashref to :full OK | |
369 | use charnames ":full", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" }; | |
370 | "Here: \N{e_ACUTE}!\n"; | |
371 | EXPECT | |
372 | $ | |
373 | ######## | |
374 | # alias with hashref to :short but using :full | |
375 | use charnames ":full", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" }; | |
376 | "Here: \N{e_ACUTE}!\n"; | |
377 | EXPECT | |
378 | Unknown charname 'LATIN:e WITH ACUTE' at | |
379 | ######## | |
380 | # alias with hashref to :short OK | |
381 | use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" }; | |
382 | "Here: \N{e_ACUTE}!\n"; | |
383 | EXPECT | |
384 | $ | |
385 | ######## | |
386 | # alias with bad hashref | |
387 | use charnames ":short", ":alias" => "e_ACUTE"; | |
388 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
389 | EXPECT | |
51cf30b6 | 390 | unicore/e_ACUTE_alias.pl cannot be used as alias file for charnames at |
35c0985d MB |
391 | ######## |
392 | # alias with arrayref | |
393 | use charnames ":short", ":alias" => [ e_ACUTE => "LATIN:e WITH ACUTE" ]; | |
394 | "Here: \N{e_ACUTE}!\n"; | |
395 | EXPECT | |
396 | Only HASH reference supported as argument to :alias at | |
397 | ######## | |
398 | # alias with bad hashref | |
399 | use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE", "a_ACUTE" }; | |
400 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
401 | EXPECT | |
402 | Use of uninitialized value in string eq at | |
403 | ######## | |
404 | # alias with hashref two aliases | |
405 | use charnames ":short", ":alias" => { | |
406 | e_ACUTE => "LATIN:e WITH ACUTE", | |
407 | a_ACUTE => "", | |
408 | }; | |
409 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
410 | EXPECT | |
411 | Unknown charname '' at | |
412 | ######## | |
413 | # alias with hashref two aliases | |
414 | use charnames ":short", ":alias" => { | |
415 | e_ACUTE => "LATIN:e WITH ACUTE", | |
416 | a_ACUTE => "LATIN:a WITH ACUTE", | |
417 | }; | |
418 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
419 | EXPECT | |
420 | $ | |
421 | ######## | |
422 | # alias with hashref using mixed aliasses | |
423 | use charnames ":short", ":alias" => { | |
424 | e_ACUTE => "LATIN:e WITH ACUTE", | |
425 | a_ACUTE => "LATIN SMALL LETTER A WITH ACUT", | |
426 | }; | |
427 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
428 | EXPECT | |
429 | Unknown charname 'LATIN SMALL LETTER A WITH ACUT' at | |
430 | ######## | |
431 | # alias with hashref using mixed aliasses | |
432 | use charnames ":short", ":alias" => { | |
433 | e_ACUTE => "LATIN:e WITH ACUTE", | |
434 | a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE", | |
435 | }; | |
436 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
437 | EXPECT | |
438 | Unknown charname 'LATIN SMALL LETTER A WITH ACUTE' at | |
439 | ######## | |
440 | # alias with hashref using mixed aliasses | |
441 | use charnames ":full", ":alias" => { | |
442 | e_ACUTE => "LATIN:e WITH ACUTE", | |
443 | a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE", | |
444 | }; | |
445 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
446 | EXPECT | |
447 | Unknown charname 'LATIN:e WITH ACUTE' at | |
448 | ######## | |
449 | # alias with nonexisting file | |
450 | use charnames ":full", ":alias" => "xyzzy"; | |
451 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
452 | EXPECT | |
51cf30b6 MB |
453 | unicore/xyzzy_alias.pl cannot be used as alias file for charnames at |
454 | ######## | |
455 | # alias with bad file name | |
456 | use charnames ":full", ":alias" => "xy 7-"; | |
457 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
458 | EXPECT | |
459 | Charnames alias files can only have identifier characters at | |
460 | ######## | |
461 | # alias with non_absolute (existing) file name (which it should /not/ use) | |
462 | use charnames ":full", ":alias" => "perl"; | |
463 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
464 | EXPECT | |
465 | unicore/perl_alias.pl cannot be used as alias file for charnames at | |
35c0985d MB |
466 | ######## |
467 | # alias with bad file | |
468 | use charnames ":full", ":alias" => "xyzzy"; | |
469 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
470 | FILE | |
471 | #!perl | |
472 | 0; | |
473 | EXPECT | |
51cf30b6 | 474 | unicore/xyzzy_alias.pl did not return a \(valid\) list of alias pairs at |
35c0985d MB |
475 | ######## |
476 | # alias with file with empty list | |
477 | use charnames ":full", ":alias" => "xyzzy"; | |
478 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
479 | FILE | |
480 | #!perl | |
481 | (); | |
482 | EXPECT | |
483 | Unknown charname 'e_ACUTE' at | |
484 | ######## | |
485 | # alias with file OK but file has :short aliasses | |
486 | use charnames ":full", ":alias" => "xyzzy"; | |
487 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
488 | FILE | |
489 | #!perl | |
490 | ( e_ACUTE => "LATIN:e WITH ACUTE", | |
491 | a_ACUTE => "LATIN:a WITH ACUTE", | |
492 | ); | |
493 | EXPECT | |
494 | Unknown charname 'LATIN:e WITH ACUTE' at | |
495 | ######## | |
496 | # alias with :short and file OK | |
497 | use charnames ":short", ":alias" => "xyzzy"; | |
498 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
499 | FILE | |
500 | #!perl | |
501 | ( e_ACUTE => "LATIN:e WITH ACUTE", | |
502 | a_ACUTE => "LATIN:a WITH ACUTE", | |
503 | ); | |
504 | EXPECT | |
505 | $ | |
506 | ######## | |
507 | # alias with :short and file OK has :long aliasses | |
508 | use charnames ":short", ":alias" => "xyzzy"; | |
509 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
510 | FILE | |
511 | #!perl | |
512 | ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE", | |
513 | a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE", | |
514 | ); | |
515 | EXPECT | |
516 | Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at | |
517 | ######## | |
518 | # alias with file implicit :full but file has :short aliasses | |
519 | use charnames ":alias" => ":xyzzy"; | |
520 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
521 | FILE | |
522 | #!perl | |
523 | ( e_ACUTE => "LATIN:e WITH ACUTE", | |
524 | a_ACUTE => "LATIN:a WITH ACUTE", | |
525 | ); | |
526 | EXPECT | |
527 | Unknown charname 'LATIN:e WITH ACUTE' at | |
528 | ######## | |
529 | # alias with file implicit :full and file has :long aliasses | |
530 | use charnames ":alias" => ":xyzzy"; | |
531 | "Here: \N{e_ACUTE}\N{a_ACUTE}!\n"; | |
532 | FILE | |
533 | #!perl | |
534 | ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE", | |
535 | a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE", | |
536 | ); | |
537 | EXPECT | |
538 | $ |