summaryrefslogtreecommitdiff
path: root/t/mro/vulcan_c3_utf8.t
diff options
context:
space:
mode:
Diffstat (limited to 't/mro/vulcan_c3_utf8.t')
-rw-r--r--t/mro/vulcan_c3_utf8.t67
1 files changed, 67 insertions, 0 deletions
diff --git a/t/mro/vulcan_c3_utf8.t b/t/mro/vulcan_c3_utf8.t
new file mode 100644
index 0000000000..68eb12ad95
--- /dev/null
+++ b/t/mro/vulcan_c3_utf8.t
@@ -0,0 +1,67 @@
+#!./perl
+
+use strict;
+use warnings;
+use utf8;
+use open qw( :utf8 :std );
+require q(./test.pl); plan(tests => 1);
+
+=pod
+
+example taken from: L<http://www.opendylan.org/books/drm/Method_Dispatch>
+
+ 옵젳Ṯ
+ ^
+ |
+ ᓕᵮꡠFᚖᶭ
+ ^ ^
+ / \
+ SㄣチenŦ 빞엗ᱞ
+ ^ ^
+ | |
+ ᕟ텔li겐ț Hʉ만ӫ읻
+ ^ ^
+ \ /
+ ቩᓪ찬
+
+ define class <SㄣチenŦ> (<ᓕᵮꡠFᚖᶭ>) end class;
+ define class <빞엗ᱞ> (<ᓕᵮꡠFᚖᶭ>) end class;
+ define class <ᕟ텔li겐ț> (<SㄣチenŦ>) end class;
+ define class <Hʉ만ӫ읻> (<빞엗ᱞ>) end class;
+ define class <ቩᓪ찬> (<ᕟ텔li겐ț>, <Hʉ만ӫ읻>) end class;
+
+=cut
+
+{
+ package 옵젳Ṯ;
+ use mro 'c3';
+
+ package ᓕᵮꡠFᚖᶭ;
+ use mro 'c3';
+ use base '옵젳Ṯ';
+
+ package SㄣチenŦ;
+ use mro 'c3';
+ use base 'ᓕᵮꡠFᚖᶭ';
+
+ package 빞엗ᱞ;
+ use mro 'c3';
+ use base 'ᓕᵮꡠFᚖᶭ';
+
+ package ᕟ텔li겐ț;
+ use mro 'c3';
+ use base 'SㄣチenŦ';
+
+ package Hʉ만ӫ읻;
+ use mro 'c3';
+ use base '빞엗ᱞ';
+
+ package ቩᓪ찬;
+ use mro 'c3';
+ use base ('ᕟ텔li겐ț', 'Hʉ만ӫ읻');
+}
+
+ok(eq_array(
+ mro::get_linear_isa('ቩᓪ찬'),
+ [ qw(ቩᓪ찬 ᕟ텔li겐ț SㄣチenŦ Hʉ만ӫ읻 빞엗ᱞ ᓕᵮꡠFᚖᶭ 옵젳Ṯ) ]
+), '... got the right MRO for the ቩᓪ찬 Dylan Example');