This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(?foo:...) loses passed in charset
[perl5.git] / t / mro / isa_aliases_utf8.t
1 #!./perl
2
3 BEGIN { chdir 't'; @INC = '../lib'; require './test.pl' }
4
5 use utf8;
6 use open qw( :utf8 :std );
7
8 plan 12;
9
10 @ฟ옥ʮ::ISA = "ᶶ";
11 *ຜ옥ㄏ::ISA = *ฟ옥ʮ::ISA;
12 @ฟ옥ʮ::ISA = "Bᐊㄗ";
13
14 ok 'ฟ옥ʮ'->isa("Bᐊㄗ"),
15  'isa after another stash has claimed the @ISA via glob assignment';
16 ok 'ຜ옥ㄏ'->isa("Bᐊㄗ"),
17  'isa on the stash that claimed the @ISA via glob assignment';
18 ok !ฟ옥ʮ->isa("ᶶ"),
19  '!isa when another stash has claimed the @ISA via glob assignment';
20 ok !ຜ옥ㄏ->isa("ᶶ"),
21  '!isa on the stash that claimed the @ISA via glob assignment';
22
23 @ฟ옥ʮ::ISA = "ᶶ";
24 *ฟ옥ʮ::ISA = ["Bᐊㄗ"];
25
26 ok 'ฟ옥ʮ'->isa("Bᐊㄗ"),
27  'isa after glob-to-ref assignment when *ISA is shared';
28 ok 'ຜ옥ㄏ'->isa("Bᐊㄗ"),
29  'isa after glob-to-ref assignment on another stash when *ISA is shared';
30 ok !ฟ옥ʮ->isa("ᶶ"),
31  '!isa after glob-to-ref assignment when *ISA is shared';
32 ok !ຜ옥ㄏ->isa("ᶶ"),
33  '!isa after glob-to-ref assignment on another stash when *ISA is shared';
34
35 @ᕘ::ISA = "ᶶ";
36 *ጶ::ISA = \@ᕘ::ISA;
37 @ᕘ::ISA = "Bᐊㄗ";
38
39 ok 'ᕘ'->isa("Bᐊㄗ"),
40  'isa after another stash has claimed the @ISA via ref-to-glob assignment';
41 ok 'ጶ'->isa("Bᐊㄗ"),
42  'isa on the stash that claimed the @ISA via ref-to-glob assignment';
43 ok !ᕘ->isa("ᶶ"),
44  '!isa when another stash has claimed the @ISA via ref-to-glob assignment';
45 ok !ጶ->isa("ᶶ"),
46  '!isa on the stash that claimed the @ISA via ref-to-glob assignment';