diff options
Diffstat (limited to 't/mro/next_goto_utf8.t')
-rw-r--r-- | t/mro/next_goto_utf8.t | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/mro/next_goto_utf8.t b/t/mro/next_goto_utf8.t new file mode 100644 index 0000000000..3fc66f2a81 --- /dev/null +++ b/t/mro/next_goto_utf8.t @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use utf8; +use open qw( :utf8 :std ); +require q(./test.pl); plan(tests => 4); + +use mro; + +{ + package PṞoxᚤ; + our @ISA = qw//; + sub next_prxᔬ { goto &next::method } + sub maybe_prxᔬ { goto &maybe::next::method } + sub can_prxᔬ { goto &next::can } + + package Ⱦ밧ᶟ; + our @ISA = qw//; + sub ᕗ { 42 } + sub Ƚ { 24 } + # বẔ doesn't exist intentionally + sub ʠঊₓ { 242 } + + package ᵗ톺; + our @ISA = qw/Ⱦ밧ᶟ/; + sub ᕗ { shift->PṞoxᚤ::next_prxᔬ() } + sub Ƚ { shift->PṞoxᚤ::maybe_prxᔬ() } + sub বẔ { shift->PṞoxᚤ::maybe_prxᔬ() } + sub ʠঊₓ { shift->PṞoxᚤ::can_prxᔬ()->() } +} + +is(ᵗ톺->ᕗ, 42, 'proxy next::method via goto'); +is(ᵗ톺->Ƚ, 24, 'proxy maybe::next::method via goto'); +ok(!ᵗ톺->বẔ, 'proxy maybe::next::method via goto with no method'); +is(ᵗ톺->ʠঊₓ, 242, 'proxy next::can via goto'); |