1 Tests for use charnames with aliases.
2 (With the exception of the first test, which otherwise would need its own file)
6 use charnames ":scoobydoo";
7 "Here: \N{e_ACUTE}!\n";
10 unsupported special ':scoobydoo' in charnames at
12 # wrong type of alias (missing colon)
14 use charnames "alias";
15 "Here: \N{e_ACUTE}!\n";
18 Unknown charname 'e_ACUTE' at
20 # alias without an argument
22 use charnames ":alias";
23 "Here: \N{e_ACUTE}!\n";
26 :alias needs an argument in charnames at
30 use charnames ":alias" => ":full";
31 "Here: \N{e_ACUTE}!\n";
34 :alias cannot use existing pragma :full \(reversed order\?\) at
36 # alias with hashref but no :full
38 use charnames ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
39 "Here: \N{e_ACUTE}!\n";
42 Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at
44 # alias with hashref but with :short
47 use charnames ":short", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
48 "Here: \N{e_ACUTE}!\n";
51 Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at
53 # alias with hashref to :full OK
56 use charnames ":full", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
57 "Here: \N{e_ACUTE}!\n";
62 # alias with hashref to :short but using :full
65 use charnames ":full", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
66 "Here: \N{e_ACUTE}!\n";
69 Unknown charname 'LATIN:e WITH ACUTE' at
71 # alias with hashref to :short OK
74 use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
75 "Here: \N{e_ACUTE}!\n";
80 # alias with bad hashref
83 use charnames ":short", ":alias" => "e_ACUTE";
84 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
87 unicore/e_ACUTE_alias.pl cannot be used as alias file for charnames at
92 use charnames ":short", ":alias" => [ e_ACUTE => "LATIN:e WITH ACUTE" ];
93 "Here: \N{e_ACUTE}!\n";
96 Only HASH reference supported as argument to :alias at
98 # alias with bad hashref
100 use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE", "a_ACUTE" };
101 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
104 Unknown charname 'a_ACUTE' at
106 # alias with hashref two aliases
109 use charnames ":short", ":alias" => {
110 e_ACUTE => "LATIN:e WITH ACUTE",
113 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
116 Unknown charname '' at
118 # alias with hashref two aliases
121 use charnames ":short", ":alias" => {
122 e_ACUTE => "LATIN:e WITH ACUTE",
123 a_ACUTE => "LATIN:a WITH ACUTE",
125 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
130 # alias with hashref using mixed aliasses
132 use charnames ":short", ":alias" => {
133 e_ACUTE => "LATIN:e WITH ACUTE",
134 a_ACUTE => "LATIN SMALL LETTER A WITH ACUT",
136 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
139 Unknown charname 'LATIN SMALL LETTER A WITH ACUT' at
141 # alias with hashref using mixed aliasses
143 use charnames ":short", ":alias" => {
144 e_ACUTE => "LATIN:e WITH ACUTE",
145 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
147 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
150 Unknown charname 'LATIN SMALL LETTER A WITH ACUTE' at
152 # alias with hashref using mixed aliasses
155 use charnames ":full", ":alias" => {
156 e_ACUTE => "LATIN:e WITH ACUTE",
157 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
159 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
162 Unknown charname 'LATIN:e WITH ACUTE' at
164 # alias with nonexisting file
167 use charnames ":full", ":alias" => "xyzzy";
168 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
171 unicore/xyzzy_alias.pl cannot be used as alias file for charnames at
173 # alias with bad file name
176 use charnames ":full", ":alias" => "xy 7-";
177 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
180 Charnames alias files can only have identifier characters at
182 # alias with non_absolute (existing) file name (which it should /not/ use)
185 use charnames ":full", ":alias" => "perl";
186 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
189 unicore/perl_alias.pl cannot be used as alias file for charnames at
191 # alias with bad file
192 --FILE-- ../lib/unicore/xyzzy_alias.pl
198 use charnames ":full", ":alias" => "xyzzy";
199 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
202 unicore/xyzzy_alias.pl did not return a \(valid\) list of alias pairs at
204 # alias with file with empty list
205 --FILE-- ../lib/unicore/xyzzy_alias.pl
211 use charnames ":full", ":alias" => "xyzzy";
212 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
215 Unknown charname 'e_ACUTE' at
217 # alias with file OK but file has :short aliasses
218 --FILE-- ../lib/unicore/xyzzy_alias.pl
220 ( e_ACUTE => "LATIN:e WITH ACUTE",
221 a_ACUTE => "LATIN:a WITH ACUTE",
226 use charnames ":full", ":alias" => "xyzzy";
227 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
230 Unknown charname 'LATIN:e WITH ACUTE' at
232 # alias with :short and file OK
233 --FILE-- ../lib/unicore/xyzzy_alias.pl
235 ( e_ACUTE => "LATIN:e WITH ACUTE",
236 a_ACUTE => "LATIN:a WITH ACUTE",
241 use charnames ":short", ":alias" => "xyzzy";
242 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
247 # alias with :short and file OK has :long aliasses
248 --FILE-- ../lib/unicore/xyzzy_alias.pl
250 ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
251 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
256 use charnames ":short", ":alias" => "xyzzy";
257 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
260 Unknown charname 'LATIN SMALL LETTER E WITH ACUTE' at
262 # alias with file implicit :full but file has :short aliasses
263 --FILE-- ../lib/unicore/xyzzy_alias.pl
265 ( e_ACUTE => "LATIN:e WITH ACUTE",
266 a_ACUTE => "LATIN:a WITH ACUTE",
271 use charnames ":alias" => ":xyzzy";
272 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
275 Unknown charname 'LATIN:e WITH ACUTE' at
277 # alias with file implicit :full and file has :long aliasses
278 --FILE-- ../lib/unicore/xyzzy_alias.pl
280 ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
281 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
286 use charnames ":alias" => ":xyzzy";
287 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
292 # charnames with no import still works for runtime functions
296 charnames::vianame('SPACE');
297 charnames::viacode(0x41);