]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - t/22-call.t
Return 'list' when we can't enter the coderef (such as calling non-overriden core...
[perl/modules/Sub-Nary.git] / t / 22-call.t
index f7bb741cf8027a5b18a2fcdda76e070d1e195e59..fdd3812fcdfac933dafba9e12f01de1c75e2d5e3 100644 (file)
@@ -3,12 +3,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 39;
+use Test::More tests => 41;
 
 use Sub::Nary;
 
 my $sn = Sub::Nary->new();
 
+sub CORE::GLOBAL::reset {
+ return 1, 2, 3
+}
+
 sub zero { }
 sub one  { 1 }
 sub two  { 1, 2 }
@@ -68,6 +72,9 @@ my @tests = (
  [ sub { \&zero },          1 ],
  [ sub { *zero },           1 ],
  [ sub { *zero{CODE}->() }, 'list' ],
+
+ [ sub { &CORE::GLOBAL::shift }, 'list' ],
+ [ sub { &CORE::GLOBAL::reset }, 3 ],
 );
 
 my $i = 1;