1 Tests for use charnames with compilation errors and aliases.
5 use charnames ":scoobydoo";
6 "Here: \N{e_ACUTE}!\n";
9 unsupported special ':scoobydoo' in charnames at
11 # NAME autoload doesn't get vianame
12 print "Here: \N{DIGIT ONE}\n";
13 charnames::vianame("DIGIT TWO");
16 Undefined subroutine &charnames::vianame called at - line \d+.
19 # NAME autoload doesn't get viacode
20 print "Here: \N{DIGIT THREE}\n";
21 charnames::viacode(0x34);
24 Undefined subroutine &charnames::viacode called at - line \d+.
27 # NAME autoload doesn't get string_vianame
28 print "Here: \N{DIGIT FOUR}\n";
29 charnames::string_vianame("DIGIT FIVE");
32 Undefined subroutine &charnames::string_vianame called at - line \d+.
35 # NAME wrong type of alias (missing colon)
37 use charnames "alias";
38 "Here: \N{e_ACUTE}!\n";
41 Unknown charname 'e_ACUTE' at - line \d+, within string
43 # NAME alias without an argument
45 use charnames ":alias";
46 "Here: \N{e_ACUTE}!\n";
49 :alias needs an argument in charnames at
51 # NAME reversed sequence
53 use charnames ":alias" => ":full";
54 "Here: \N{e_ACUTE}!\n";
57 :alias cannot use existing pragma :full \(reversed order\?\) at
59 # NAME alias with hashref but no :full
61 use charnames ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
62 "Here: \N{e_ACUTE}!\n";
65 Unknown charname 'e_ACUTE' at - line \d+, within string
67 # NAME alias with hashref but with :short
70 use charnames ":short", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
71 "Here: \N{e_ACUTE}!\n";
74 Unknown charname 'e_ACUTE' at - line \d+, within string
76 # NAME alias with hashref to :full OK
79 use charnames ":full", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
80 "Here: \N{e_ACUTE}!\n";
85 # NAME alias with hashref to :loose OK
88 use charnames ":loose", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
89 "Here: \N{e_ACUTE}!\n";
94 # NAME alias with :loose requires :full type name
97 use charnames ":loose", ":alias" => { e_ACUTE => "latin SMALL LETTER E WITH ACUTE" };
98 "Here: \N{e_ACUTE}!\n";
101 Unknown charname 'e_ACUTE' at - line \d+, within string
103 # NAME alias with hashref to :short but using :full
106 use charnames ":full", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
107 "Here: \N{e_ACUTE}!\n";
110 Unknown charname 'e_ACUTE' at - line \d+, within string
112 # NAME alias with hashref to :short OK
115 use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
116 "Here: \N{e_ACUTE}!\n";
121 # NAME alias with bad hashref
124 use charnames ":short", ":alias" => "e_ACUTE";
125 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
128 unicore/e_ACUTE_alias.pl cannot be used as alias file for charnames at
130 # NAME alias with arrayref
133 use charnames ":short", ":alias" => [ e_ACUTE => "LATIN:e WITH ACUTE" ];
134 "Here: \N{e_ACUTE}!\n";
137 Only HASH reference supported as argument to :alias at
139 # NAME alias with bad hashref
141 use charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE", "a_ACUTE" };
142 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
145 Unknown charname 'a_ACUTE' at
147 # NAME alias with hashref two aliases
150 use charnames ":short", ":alias" => {
151 e_ACUTE => "LATIN:e WITH ACUTE",
154 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
157 Unknown charname 'a_ACUTE' at - line \d+, within string
159 # NAME alias with hashref two aliases
162 use charnames ":short", ":alias" => {
163 e_ACUTE => "LATIN:e WITH ACUTE",
164 a_ACUTE => "LATIN:a WITH ACUTE",
166 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
171 # NAME alias with hashref using mixed aliases
173 use charnames ":short", ":alias" => {
174 e_ACUTE => "LATIN:e WITH ACUTE",
175 a_ACUTE => "LATIN SMALL LETTER A WITH ACUT",
177 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
180 Unknown charname 'a_ACUTE' at - line \d+, within string
182 # NAME alias with hashref using mixed aliases
184 use charnames ":short", ":alias" => {
185 e_ACUTE => "LATIN:e WITH ACUTE",
186 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
188 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
191 Unknown charname 'a_ACUTE' at - line \d+, within string
193 # NAME alias with hashref using mixed aliases
196 use charnames ":full", ":alias" => {
197 e_ACUTE => "LATIN:e WITH ACUTE",
198 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
200 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
203 Unknown charname 'e_ACUTE' at - line \d+, within string
205 # NAME alias with nonexisting file
208 use charnames ":full", ":alias" => "non_existing_xyzzy";
209 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
212 unicore/non_existing_xyzzy_alias.pl cannot be used as alias file for charnames at
214 # NAME alias with bad file name
217 use charnames ":full", ":alias" => "xy 7-";
218 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
221 Charnames alias files can only have identifier characters at
223 # NAME alias with non_absolute (existing) file name (which it should /not/ use)
226 use charnames ":full", ":alias" => "perl";
227 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
230 unicore/perl_alias.pl cannot be used as alias file for charnames at
232 # NAME alias with bad file
233 --FILE-- ../../lib/unicore/xyzzy_alias.pl
239 use charnames ":full", ":alias" => "xyzzy";
240 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
243 unicore/xyzzy_alias.pl did not return a \(valid\) list of alias pairs at
245 # NAME alias with file with empty list
246 --FILE-- ../../lib/unicore/xyzzy_alias.pl
252 use charnames ":full", ":alias" => "xyzzy";
253 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
256 Unknown charname 'e_ACUTE' at - line \d+, within string
258 # NAME alias with file OK but file has :short aliases
259 --FILE-- ../../lib/unicore/xyzzy_alias.pl
261 ( e_ACUTE => "LATIN:e WITH ACUTE",
262 a_ACUTE => "LATIN:a WITH ACUTE",
267 use charnames ":full", ":alias" => "xyzzy";
268 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
271 Unknown charname 'e_ACUTE' at - line \d+, within string
273 # NAME alias with :short and file OK
274 --FILE-- ../../lib/unicore/xyzzy_alias.pl
276 ( e_ACUTE => "LATIN:e WITH ACUTE",
277 a_ACUTE => "LATIN:a WITH ACUTE",
282 use charnames ":short", ":alias" => "xyzzy";
283 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
288 # NAME alias with :short and file OK has :long aliases
289 --FILE-- ../../lib/unicore/xyzzy_alias.pl
291 ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
292 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
297 use charnames ":short", ":alias" => "xyzzy";
298 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
301 Unknown charname 'e_ACUTE' at - line \d+, within string
303 # NAME alias with file implicit :full but file has :short aliases
304 --FILE-- ../../lib/unicore/xyzzy_alias.pl
306 ( e_ACUTE => "LATIN:e WITH ACUTE",
307 a_ACUTE => "LATIN:a WITH ACUTE",
312 use charnames ":alias" => ":xyzzy";
313 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
316 Unknown charname 'e_ACUTE' at - line \d+, within string
318 # NAME alias with file implicit :full and file has :long aliases
319 --FILE-- ../../lib/unicore/xyzzy_alias.pl
321 ( e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
322 a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
327 use charnames ":alias" => ":xyzzy";
328 "Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
333 # NAME charnames with no import still works for runtime functions
337 charnames::vianame('SPACE');
338 charnames::viacode(0x41);
343 # NAME no extraneous warning [perl #11560]
346 print charnames::viacode(0x80), "\n";