diff options
Diffstat (limited to 't/mro/next_edgecases.t')
-rw-r--r-- | t/mro/next_edgecases.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/mro/next_edgecases.t b/t/mro/next_edgecases.t index 91c2c8581b..ff3272dc60 100644 --- a/t/mro/next_edgecases.t +++ b/t/mro/next_edgecases.t @@ -3,7 +3,7 @@ use strict; use warnings; -require q(./test.pl); plan(tests => 11); +require q(./test.pl); plan(tests => 12); { @@ -78,5 +78,16 @@ require q(./test.pl); plan(tests => 11); eval { $baz->bar() }; ok($@, '... calling bar() with next::method failed') || diag $@; - } + } + + # Test with non-existing class (used to segfault) + { + package Qux; + use mro; + sub foo { No::Such::Class->next::can } + } + + eval { Qux->foo() }; + is($@, '', "->next::can on non-existing package name"); + } |