This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix O_CREAT without O_TRUNC in cpan/autodie/t/utf8_open.t
[perl5.git] / t / mro / vulcan_c3_utf8.t
CommitLineData
204e6232
BF
1#!./perl
2
3use strict;
4use warnings;
5use utf8;
6use open qw( :utf8 :std );
7require q(./test.pl); plan(tests => 1);
8
9=pod
10
11example taken from: L<http://www.opendylan.org/books/drm/Method_Dispatch>
12
13 옵젳Ṯ
14 ^
15 |
16 ᓕᵮꡠFᚖᶭ
17 ^ ^
18 / \
19 SㄣチenŦ 빞엗ᱞ
20 ^ ^
21 | |
22 ᕟ텔li겐ț Hʉ만ӫ읻
23 ^ ^
24 \ /
25 ቩᓪ찬
26
27 define class <SㄣチenŦ> (<ᓕᵮꡠFᚖᶭ>) end class;
28 define class <빞엗ᱞ> (<ᓕᵮꡠFᚖᶭ>) end class;
29 define class <ᕟ텔li겐ț> (<SㄣチenŦ>) end class;
30 define class <Hʉ만ӫ읻> (<빞엗ᱞ>) end class;
31 define class <ቩᓪ찬> (<ᕟ텔li겐ț>, <Hʉ만ӫ읻>) end class;
32
33=cut
34
35{
36 package 옵젳Ṯ;
37 use mro 'c3';
38
39 package ᓕᵮꡠFᚖᶭ;
40 use mro 'c3';
41 use base '옵젳Ṯ';
42
43 package SㄣチenŦ;
44 use mro 'c3';
45 use base 'ᓕᵮꡠFᚖᶭ';
46
47 package 빞엗ᱞ;
48 use mro 'c3';
49 use base 'ᓕᵮꡠFᚖᶭ';
50
51 package ᕟ텔li겐ț;
52 use mro 'c3';
53 use base 'SㄣチenŦ';
54
55 package Hʉ만ӫ읻;
56 use mro 'c3';
57 use base '빞엗ᱞ';
58
59 package ቩᓪ찬;
60 use mro 'c3';
61 use base ('ᕟ텔li겐ț', 'Hʉ만ӫ읻');
62}
63
64ok(eq_array(
65 mro::get_linear_isa('ቩᓪ찬'),
66 [ qw(ቩᓪ찬 ᕟ텔li겐ț SㄣチenŦ Hʉ만ӫ읻 빞엗ᱞ ᓕᵮꡠFᚖᶭ 옵젳Ṯ) ]
67), '... got the right MRO for the ቩᓪ찬 Dylan Example');