1#!./perl
2
3use strict;
4use warnings;
5BEGIN {
6    unless (-d 'blib') {
7        chdir 't' if -d 't';
8    }
9    require q(./test.pl);
10    set_up_inc('../lib');
11}
12
13use utf8;
14use open qw( :utf8 :std );
15
16plan(tests => 7);
17
18{
19    packagee텟ʇ;
20    use strict;
21    use warnings;
22    use mro 'c3';
23
24    package OvrꪩࡃᛝTeŝṱ;
25    use strict;
26    use warnings;
27    use mro 'c3';
28    use base '밧e텟ʇ';
29    use overload '""' => sub { ref(shift) . " stringified" },
30                 fallback => 1;
31
32    sub ネᚹ { bless {} => shift }
33
34    package 읺ҎꀀḮṆᵷꜰ롬ᵕveŔŁoad엗텟ᵵ;
35    use strict;
36    use warnings;
37    use base 'Ov에rꪩࡃᛝTeŝṱ';
38    use mro 'c3';
39}
40
41my $x = 읺ҎꀀḮṆᵷꜰ롬ᵕveŔŁoad엗텟ᵵ->ネᚹ();
42object_ok($x, '읺ҎꀀḮṆᵷꜰ롬ᵕveŔŁoad엗텟ᵵ');
43
44my $y = OvrꪩࡃᛝTeŝṱ->ネᚹ();
45object_ok($y, 'Ov에rꪩࡃᛝTeŝṱ');
46
47is("$x", '읺ҎꀀḮṆᵷꜰ롬ᵕveŔŁoad엗텟ᵵ stringified', '... got the right value when stringifing');
48is("$y", 'Ov에rꪩࡃᛝTeŝṱ stringified', '... got the right value when stringifing');
49
50ok(($y eq 'Ov에rꪩࡃᛝTeŝṱ stringified'), '... eq was handled correctly');
51
52my $result;
53eval {
54    $result = $x eq '읺ҎꀀḮṆᵷꜰ롬ᵕveŔŁoad엗텟ᵵ stringified'
55};
56ok(!$@, '... this should not throw an exception');
57ok($result, '... and we should get the true value');
58
59