xref: /openbsd/gnu/usr.bin/perl/t/lib/charnames/alias (revision 56d68f1e)
1898184e3SsthenTests for use charnames with compilation errors and aliases.
2898184e3Ssthen__END__
3898184e3Ssthen# NAME illegal :pragma
4898184e3Ssthenuse warnings;
5898184e3Ssthenuse charnames ":scoobydoo";
6898184e3Ssthen"Here: \N{e_ACUTE}!\n";
7898184e3SsthenEXPECT
8898184e3SsthenOPTIONS regex
9898184e3Ssthenunsupported special ':scoobydoo' in charnames at
10898184e3Ssthen########
11898184e3Ssthen# NAME autoload doesn't get vianame
12898184e3Ssthenprint "Here: \N{DIGIT ONE}\n";
13898184e3Ssthencharnames::vianame("DIGIT TWO");
14898184e3SsthenEXPECT
1591f110e0Safresh1OPTIONS regex
1691f110e0Safresh1Undefined subroutine &charnames::vianame called at - line \d+.
17898184e3SsthenHere: 1
18898184e3Ssthen########
19898184e3Ssthen# NAME autoload doesn't get viacode
20898184e3Ssthenprint "Here: \N{DIGIT THREE}\n";
21b8851fccSafresh1charnames::viacode(utf8::unicode_to_native(0x34));
22898184e3SsthenEXPECT
23898184e3SsthenOPTIONS regex
2491f110e0Safresh1Undefined subroutine &charnames::viacode called at - line \d+.
25898184e3SsthenHere: 3
26898184e3Ssthen########
27898184e3Ssthen# NAME autoload doesn't get string_vianame
28898184e3Ssthenprint "Here: \N{DIGIT FOUR}\n";
29898184e3Ssthencharnames::string_vianame("DIGIT FIVE");
30898184e3SsthenEXPECT
31898184e3SsthenOPTIONS regex
3291f110e0Safresh1Undefined subroutine &charnames::string_vianame called at - line \d+.
33898184e3SsthenHere: 4
34898184e3Ssthen########
35898184e3Ssthen# NAME wrong type of alias (missing colon)
36898184e3Ssthenno warnings;
37898184e3Ssthenuse charnames "alias";
38898184e3Ssthen"Here: \N{e_ACUTE}!\n";
39898184e3SsthenEXPECT
4091f110e0Safresh1OPTIONS regex fatal
4191f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
42898184e3Ssthen########
43898184e3Ssthen# NAME alias without an argument
44898184e3Ssthenuse warnings;
45898184e3Ssthenuse charnames ":alias";
46898184e3Ssthen"Here: \N{e_ACUTE}!\n";
47898184e3SsthenEXPECT
48898184e3SsthenOPTIONS regex
49898184e3Ssthen:alias needs an argument in charnames at
50898184e3Ssthen########
51898184e3Ssthen# NAME reversed sequence
52898184e3Ssthenuse warnings;
53898184e3Ssthenuse charnames ":alias" => ":full";
54898184e3Ssthen"Here: \N{e_ACUTE}!\n";
55898184e3SsthenEXPECT
56898184e3SsthenOPTIONS regex
57898184e3Ssthen:alias cannot use existing pragma :full \(reversed order\?\) at
58898184e3Ssthen########
59898184e3Ssthen# NAME alias with hashref but with :short
60898184e3Ssthenuse warnings;
61898184e3Ssthenno warnings 'void';
62898184e3Ssthenuse charnames ":short", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
63898184e3Ssthen"Here: \N{e_ACUTE}!\n";
64898184e3SsthenEXPECT
6591f110e0Safresh1OPTIONS regex fatal
6691f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
67898184e3Ssthen########
68898184e3Ssthen# NAME alias with hashref to :full OK
69898184e3Ssthenuse warnings;
70898184e3Ssthenno warnings 'void';
71898184e3Ssthenuse charnames ":full", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
72898184e3Ssthen"Here: \N{e_ACUTE}!\n";
73898184e3SsthenEXPECT
74898184e3SsthenOPTIONS regex
75898184e3Ssthen$
76898184e3Ssthen########
77898184e3Ssthen# NAME alias with hashref to :loose OK
78898184e3Ssthenuse warnings;
79898184e3Ssthenno warnings 'void';
80898184e3Ssthenuse charnames ":loose", ":alias" => { e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE" };
81898184e3Ssthen"Here: \N{e_ACUTE}!\n";
82898184e3SsthenEXPECT
83898184e3SsthenOPTIONS regex
84898184e3Ssthen$
85898184e3Ssthen########
86898184e3Ssthen# NAME alias with :loose requires :full type name
87898184e3Ssthenuse warnings;
88898184e3Ssthenno warnings 'void';
89898184e3Ssthenuse charnames ":loose", ":alias" => { e_ACUTE => "latin SMALL LETTER E WITH ACUTE" };
90898184e3Ssthen"Here: \N{e_ACUTE}!\n";
91898184e3SsthenEXPECT
9291f110e0Safresh1OPTIONS regex fatal
9391f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
94898184e3Ssthen########
95898184e3Ssthen# NAME alias with hashref to :short but using :full
96898184e3Ssthenuse warnings;
97898184e3Ssthenno warnings 'void';
98898184e3Ssthenuse charnames ":full", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
99898184e3Ssthen"Here: \N{e_ACUTE}!\n";
100898184e3SsthenEXPECT
10191f110e0Safresh1OPTIONS regex fatal
10291f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
103898184e3Ssthen########
104898184e3Ssthen# NAME alias with hashref to :short OK
105898184e3Ssthenuse warnings;
106898184e3Ssthenno warnings 'void';
107898184e3Ssthenuse charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE" };
108898184e3Ssthen"Here: \N{e_ACUTE}!\n";
109898184e3SsthenEXPECT
110898184e3SsthenOPTIONS regex
111898184e3Ssthen$
112898184e3Ssthen########
113898184e3Ssthen# NAME alias with bad hashref
114898184e3Ssthenuse warnings;
115898184e3Ssthenno warnings 'void';
116898184e3Ssthenuse charnames ":short", ":alias" => "e_ACUTE";
117898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
118898184e3SsthenEXPECT
119898184e3SsthenOPTIONS regex
120898184e3Ssthenunicore/e_ACUTE_alias.pl cannot be used as alias file for charnames at
121898184e3Ssthen########
122898184e3Ssthen# NAME alias with arrayref
123898184e3Ssthenuse warnings;
124898184e3Ssthenno warnings 'void';
125898184e3Ssthenuse charnames ":short", ":alias" => [ e_ACUTE => "LATIN:e WITH ACUTE" ];
126898184e3Ssthen"Here: \N{e_ACUTE}!\n";
127898184e3SsthenEXPECT
128898184e3SsthenOPTIONS regex
129898184e3SsthenOnly HASH reference supported as argument to :alias at
130898184e3Ssthen########
131898184e3Ssthen# NAME alias with bad hashref
132898184e3Ssthenno warnings;
133898184e3Ssthenuse charnames ":short", ":alias" => { e_ACUTE => "LATIN:e WITH ACUTE", "a_ACUTE" };
134898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
135898184e3SsthenEXPECT
136898184e3SsthenOPTIONS regex
137898184e3SsthenUnknown charname 'a_ACUTE' at
138898184e3Ssthen########
139898184e3Ssthen# NAME alias with hashref two aliases
140898184e3Ssthenuse warnings;
141898184e3Ssthenno warnings 'void';
142898184e3Ssthenuse charnames ":short", ":alias" => {
143898184e3Ssthen    e_ACUTE => "LATIN:e WITH ACUTE",
144898184e3Ssthen    a_ACUTE => "",
145898184e3Ssthen    };
146898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
147898184e3SsthenEXPECT
14891f110e0Safresh1OPTIONS regex fatal
14991f110e0Safresh1Unknown charname 'a_ACUTE' at - line \d+, within string
150898184e3Ssthen########
151898184e3Ssthen# NAME alias with hashref two aliases
152898184e3Ssthenuse warnings;
153898184e3Ssthenno warnings 'void';
154898184e3Ssthenuse charnames ":short", ":alias" => {
155898184e3Ssthen    e_ACUTE => "LATIN:e WITH ACUTE",
156898184e3Ssthen    a_ACUTE => "LATIN:a WITH ACUTE",
157898184e3Ssthen    };
158898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
159898184e3SsthenEXPECT
160898184e3SsthenOPTIONS regex
161898184e3Ssthen$
162898184e3Ssthen########
163898184e3Ssthen# NAME alias with hashref using mixed aliases
164898184e3Ssthenuse warnings;
165898184e3Ssthenuse charnames ":short", ":alias" => {
166898184e3Ssthen    e_ACUTE => "LATIN:e WITH ACUTE",
167898184e3Ssthen    a_ACUTE => "LATIN SMALL LETTER A WITH ACUT",
168898184e3Ssthen    };
169898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
170898184e3SsthenEXPECT
17191f110e0Safresh1OPTIONS regex fatal
17291f110e0Safresh1Unknown charname 'a_ACUTE' at - line \d+, within string
173898184e3Ssthen########
174898184e3Ssthen# NAME alias with hashref using mixed aliases
175898184e3Ssthenuse warnings;
176898184e3Ssthenuse charnames ":short", ":alias" => {
177898184e3Ssthen    e_ACUTE => "LATIN:e WITH ACUTE",
178898184e3Ssthen    a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
179898184e3Ssthen    };
180898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
181898184e3SsthenEXPECT
18291f110e0Safresh1OPTIONS regex fatal
18391f110e0Safresh1Unknown charname 'a_ACUTE' at - line \d+, within string
184898184e3Ssthen########
185898184e3Ssthen# NAME alias with hashref using mixed aliases
186898184e3Ssthenuse warnings;
187898184e3Ssthenno warnings 'void';
188898184e3Ssthenuse charnames ":full", ":alias" => {
189898184e3Ssthen    e_ACUTE => "LATIN:e WITH ACUTE",
190898184e3Ssthen    a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
191898184e3Ssthen    };
192898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
193898184e3SsthenEXPECT
19491f110e0Safresh1OPTIONS regex fatal
19591f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
196898184e3Ssthen########
197898184e3Ssthen# NAME alias with nonexisting file
198898184e3Ssthenuse warnings;
199898184e3Ssthenno warnings 'void';
200898184e3Ssthenuse charnames ":full", ":alias" => "non_existing_xyzzy";
201898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
202898184e3SsthenEXPECT
203898184e3SsthenOPTIONS regex
204898184e3Ssthenunicore/non_existing_xyzzy_alias.pl cannot be used as alias file for charnames at
205898184e3Ssthen########
206898184e3Ssthen# NAME alias with bad file name
207898184e3Ssthenuse warnings;
208898184e3Ssthenno warnings 'void';
209898184e3Ssthenuse charnames ":full", ":alias" => "xy 7-";
210898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
211898184e3SsthenEXPECT
212898184e3SsthenOPTIONS regex
21391f110e0Safresh1Charnames alias file names can only have identifier characters at
214898184e3Ssthen########
215898184e3Ssthen# NAME alias with non_absolute (existing) file name (which it should /not/ use)
216898184e3Ssthenuse warnings;
217898184e3Ssthenno warnings 'void';
218898184e3Ssthenuse charnames ":full", ":alias" => "perl";
219898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
220898184e3SsthenEXPECT
221898184e3SsthenOPTIONS regex
222898184e3Ssthenunicore/perl_alias.pl cannot be used as alias file for charnames at
223898184e3Ssthen########
22491f110e0Safresh1# NAME alias with bad file
225898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
226898184e3Ssthen#!perl
227898184e3Ssthen0;
228898184e3Ssthen--FILE--
229898184e3Ssthenuse warnings;
230898184e3Ssthenno warnings 'void';
231898184e3Ssthenuse charnames ":full", ":alias" => "xyzzy";
232898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
233898184e3SsthenEXPECT
234898184e3SsthenOPTIONS regex
235898184e3Ssthenunicore/xyzzy_alias.pl did not return a \(valid\) list of alias pairs at
236898184e3Ssthen########
23791f110e0Safresh1# NAME alias with file with empty list
238898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
239898184e3Ssthen#!perl
240898184e3Ssthen();
241898184e3Ssthen--FILE--
242898184e3Ssthenuse warnings;
243898184e3Ssthenno warnings 'void';
244898184e3Ssthenuse charnames ":full", ":alias" => "xyzzy";
245898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
246898184e3SsthenEXPECT
24791f110e0Safresh1OPTIONS regex fatal
24891f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
249898184e3Ssthen########
25091f110e0Safresh1# NAME alias with file OK but file has :short aliases
251898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
252898184e3Ssthen#!perl
253898184e3Ssthen(   e_ACUTE => "LATIN:e WITH ACUTE",
254898184e3Ssthen    a_ACUTE => "LATIN:a WITH ACUTE",
255898184e3Ssthen    );
256898184e3Ssthen--FILE--
257898184e3Ssthenuse warnings;
258898184e3Ssthenno warnings 'void';
259898184e3Ssthenuse charnames ":full", ":alias" => "xyzzy";
260898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
261898184e3SsthenEXPECT
26291f110e0Safresh1OPTIONS regex fatal
26391f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
264898184e3Ssthen########
26591f110e0Safresh1# NAME alias with :short and file OK
266898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
267898184e3Ssthen#!perl
268898184e3Ssthen(   e_ACUTE => "LATIN:e WITH ACUTE",
269898184e3Ssthen    a_ACUTE => "LATIN:a WITH ACUTE",
270898184e3Ssthen    );
271898184e3Ssthen--FILE--
272898184e3Ssthenuse warnings;
273898184e3Ssthenno warnings 'void';
274898184e3Ssthenuse charnames ":short", ":alias" => "xyzzy";
275898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
276898184e3SsthenEXPECT
277898184e3SsthenOPTIONS regex
278898184e3Ssthen$
279898184e3Ssthen########
28091f110e0Safresh1# NAME alias with :short and file OK has :long aliases
281898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
282898184e3Ssthen#!perl
283898184e3Ssthen(   e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
284898184e3Ssthen    a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
285898184e3Ssthen    );
286898184e3Ssthen--FILE--
287898184e3Ssthenuse warnings;
288898184e3Ssthenno warnings 'void';
289898184e3Ssthenuse charnames ":short", ":alias" => "xyzzy";
290898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
291898184e3SsthenEXPECT
29291f110e0Safresh1OPTIONS regex fatal
29391f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
294898184e3Ssthen########
29591f110e0Safresh1# NAME alias with file implicit :full but file has :short aliases
296898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
297898184e3Ssthen#!perl
298898184e3Ssthen(   e_ACUTE => "LATIN:e WITH ACUTE",
299898184e3Ssthen    a_ACUTE => "LATIN:a WITH ACUTE",
300898184e3Ssthen    );
301898184e3Ssthen--FILE--
302898184e3Ssthenuse warnings;
303898184e3Ssthenno warnings 'void';
304898184e3Ssthenuse charnames ":alias" => ":xyzzy";
305898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
306898184e3SsthenEXPECT
30791f110e0Safresh1OPTIONS regex fatal
30891f110e0Safresh1Unknown charname 'e_ACUTE' at - line \d+, within string
309898184e3Ssthen########
31091f110e0Safresh1# NAME alias with file implicit :full and file has :long aliases
311898184e3Ssthen--FILE-- ../../lib/unicore/xyzzy_alias.pl
312898184e3Ssthen#!perl
313898184e3Ssthen(   e_ACUTE => "LATIN SMALL LETTER E WITH ACUTE",
314898184e3Ssthen    a_ACUTE => "LATIN SMALL LETTER A WITH ACUTE",
315898184e3Ssthen    );
316898184e3Ssthen--FILE--
317898184e3Ssthenuse warnings;
318898184e3Ssthenno warnings 'void';
319898184e3Ssthenuse charnames ":alias" => ":xyzzy";
320898184e3Ssthen"Here: \N{e_ACUTE}\N{a_ACUTE}!\n";
321898184e3SsthenEXPECT
322898184e3SsthenOPTIONS regex
323898184e3Ssthen$
324898184e3Ssthen########
325898184e3Ssthen# NAME charnames with no import still works for runtime functions
326898184e3Ssthenuse warnings;
327898184e3Ssthenno warnings 'void';
328898184e3Ssthenuse charnames ();
329898184e3Ssthencharnames::vianame('SPACE');
330b8851fccSafresh1charnames::viacode(utf8::unicode_to_native(0x41));
331898184e3SsthenEXPECT
332898184e3SsthenOPTIONS regex
333898184e3Ssthen$
334898184e3Ssthen########
335898184e3Ssthen# NAME no extraneous warning [perl #11560]
336898184e3Ssthenuse warnings;
337898184e3Ssthenuse charnames ();
338b8851fccSafresh1print charnames::viacode(utf8::unicode_to_native(0x80)), "\n";
339898184e3SsthenEXPECT
340898184e3SsthenOPTIONS regex
341898184e3SsthenPADDING CHARACTER
34291f110e0Safresh1########
343b8851fccSafresh1# NAME A wrong character in :alias is an error
344b8851fccSafresh1# These next tests could be combined, but the messages can come out in
345b8851fccSafresh1# different orders on EBCDIC vs ASCII, and can't have both 'random' and 'regex'
346b8851fccSafresh1# options, and need 'regex' to avoid 'at line X' getting in the way.
34791f110e0Safresh1use charnames ":full", ":alias" => {
34891f110e0Safresh1                            "4e_ACUTE" => "LATIN SMALL LETTER E WITH ACUTE",
34991f110e0Safresh1                    };
35091f110e0Safresh1EXPECT
35191f110e0Safresh1OPTIONS regex
35291f110e0Safresh1Invalid character in charnames alias definition; marked by <-- HERE in '4<-- HERE e_ACUTE'
353b8851fccSafresh1########
354b8851fccSafresh1# NAME Another wrong character in :alias is an error
355b8851fccSafresh1use charnames ":full", ":alias" => {
356b8851fccSafresh1                            "e_A,CUTE" => "LATIN SMALL LETTER E WITH ACUTE",
357b8851fccSafresh1                    };
358b8851fccSafresh1EXPECT
359b8851fccSafresh1OPTIONS regex
36091f110e0Safresh1Invalid character in charnames alias definition; marked by <-- HERE in 'e_A,<-- HERE CUTE'
361b8851fccSafresh1########
362b8851fccSafresh1# NAME Another wrong character in :alias is an error
363b8851fccSafresh1# The EXPECT regex matches both the UTF-8 and non-UTF-8 form.
364b8851fccSafresh1# This is because under some circumstances the message gets output as UTF-8.
365b8851fccSafresh1# We use \xab, as that is invalid in both ASCII and EBCDIC platforms, and we
366b8851fccSafresh1# accept both UTF-8 and 1047 UTF-EBCDIC.
367b8851fccSafresh1use charnames ":full", ":alias" => {
368b8851fccSafresh1                            "e_ACUT\x{ab}E" => "LATIN SMALL LETTER E WITH ACUTE",
369b8851fccSafresh1                    };
370b8851fccSafresh1EXPECT
371b8851fccSafresh1OPTIONS regex
372b8851fccSafresh1Invalid character in charnames alias definition; marked by <-- HERE in 'e_ACUT(?:\x{ab}|\x{C2}\x{AB}|\x{80\x{73})<-- HERE E'
37391f110e0Safresh1########
37491f110e0Safresh1# RT#73022
37591f110e0Safresh1# NAME \N{...} interprets ... as octets rather than UTF-8
37691f110e0Safresh1use utf8;
37791f110e0Safresh1use open qw( :utf8 :std );
37891f110e0Safresh1use charnames ":full", ":alias" => { "自転車に乗る人" => "BICYCLIST" };
37991f110e0Safresh1print "ok\n" if "\N{自転車に乗る人}" eq "\x{1F6B4}";
38091f110e0Safresh1EXPECT
38191f110e0Safresh1ok
38291f110e0Safresh1########
38391f110e0Safresh1# NAME Misspelled \N{} UTF-8 names are errors
38491f110e0Safresh1use utf8;
38591f110e0Safresh1use open qw( :utf8 :std );
38691f110e0Safresh1use charnames ":full", ":alias" => { "自転車に乗る人" => "BICYCLIST" };
38791f110e0Safresh1print "ok\n" if "\N{転車に乗る人}" eq "\x{1F6B4}";
38891f110e0Safresh1EXPECT
38991f110e0Safresh1OPTIONS regex
39091f110e0Safresh1Unknown charname '転車に乗る人' at - line \d+, within string
39191f110e0Safresh1########
39291f110e0Safresh1# NAME various wrong UTF-8 characters in :alias are errors
39391f110e0Safresh1# First has a punctuation, KATAKANA MIDDLE DOT, in it; second begins with a
39491f110e0Safresh1# digit: ARABIC-INDIC DIGIT FOUR
395b8851fccSafresh1# Note that output order is alphabetical by character name
39691f110e0Safresh1use utf8;
39791f110e0Safresh1use open qw( :utf8 :std );
39891f110e0Safresh1use charnames ":full", ":alias" => { "自転車・に乗る人" => "BICYCLIST",
39991f110e0Safresh1                                     "٤転車に乗る人" => "BICYCLIST",
400b8851fccSafresh1                                "TOO  MANY SPACES" => "NO ENTRY SIGN",
40191f110e0Safresh1                                "TRAILING SPACE " => "FACE WITH NO GOOD GESTURE"
40291f110e0Safresh1                                    };
40391f110e0Safresh1print "ok\n" if "\N{TOO  MANY SPACES}" eq "\x{1F6AB}";
40491f110e0Safresh1print "ok\n" if "\N{TRAILING SPACE }" eq "\x{1F645}";
405b8851fccSafresh1print "ok\n" if "\N{自転車・に乗る人}" eq "\x{1F6B4}";
406b8851fccSafresh1print "ok\n" if "\N{٤転車に乗る人}" eq "\x{1F6B4}";
407b8851fccSafresh1EXPECT
408b8851fccSafresh1OPTIONS regex fatal
409b8851fccSafresh1charnames alias definitions may not contain a sequence of multiple spaces; marked by <-- HERE in 'TOO   <-- HERE MANY SPACES'
410b8851fccSafresh1charnames alias definitions may not contain trailing white-space; marked by <-- HERE in 'TRAILING SPACE  <-- HERE '
411b8851fccSafresh1Invalid character in charnames alias definition; marked by <-- HERE in '٤<-- HERE 転車に乗る人'
412b8851fccSafresh1Invalid character in charnames alias definition; marked by <-- HERE in '自転車・<-- HERE に乗る人' at - line \d+
413b8851fccSafresh1########
414*56d68f1eSafresh1# NAME Using NBSP in :alias names is deprecated
415b8851fccSafresh1use utf8;
416b8851fccSafresh1use open qw( :utf8 :std );
417b8851fccSafresh1use charnames ":alias" => { "NBSP SEPARATED SPACE" => "BLACK SMILING FACE" };
418b8851fccSafresh1print "ok\n" if "\N{NBSP SEPARATED SPACE}" eq "\x{263B}";
41991f110e0Safresh1EXPECT
4209f11ffb7Safresh1OPTIONS regex fatal
4219f11ffb7Safresh1Invalid character in charnames alias definition; marked by <-- HERE in 'NBSP <-- HERE SEPARATED SPACE' at - line 3
422