]> git.vpit.fr Git - perl/modules/B-RecDeparse.git/blobdiff - t/17-calls.t
Don't recurse into empty subroutines
[perl/modules/B-RecDeparse.git] / t / 17-calls.t
index 76e8a3cb2c6457f18dc39a9c52888c5339d09390..99f5e4f80d14a0c294440128736040fc47b5f44a 100644 (file)
@@ -3,13 +3,14 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2 * 4 * 6;
+use Test::More tests => 2 * 4 * 7;
 
 use B::RecDeparse;
 
 my $brd = B::RecDeparse->new(level => -1);
 
 sub foo { 123 }
+sub baz;
 my $pkg;
 my $coderef;
 
@@ -24,6 +25,11 @@ my @tests = (
  [ x3 => 'bar(@_)',    'bar' ],
  [ x4 => 'bar(shift)', 'bar' ],
 
+ [ d1 => 'baz()',      'baz' ],
+ [ d2 => 'baz(1)',     'baz' ],
+ [ d3 => 'baz(@_)',    'baz' ],
+ [ d4 => 'baz(shift)', 'baz' ],
+
  [ c1 => '$coderef->()',      'coderef' ],
  [ c2 => '$coderef->(1)',     'coderef' ],
  [ c3 => '$coderef->(@_)',    'coderef' ],