This patch involves addding another "perl -d" input script that contains a
subroutine that isn't called by default.
lib/perl5db/t/rt-66110 Tests for the Perl debugger
lib/perl5db/t/symbol-table-bug Tests for the Perl debugger
lib/perl5db/t/taint Tests for the Perl debugger
+lib/perl5db/t/uncalled-subroutine Tests for the Perl debugger
lib/perl5db/t/with-subroutine Tests for the Perl debugger
lib/PerlIO.pm PerlIO support module
lib/Pod/Functions.pm used by pod/splitpod
}
}
-plan(28);
+plan(29);
my $rc_filename = '.perldb';
);
}
+{
+ rc(<<'EOF');
+&parse_options("NonStop=0 TTY=db.out LineInfo=db.out");
+
+sub afterinit {
+ push (@DB::typeahead,
+ 's uncalled_subroutine()',
+ 'c',
+ 'q',
+ );
+
+}
+EOF
+
+ my $output = runperl(switches => [ '-d', ], stderr => 1, progfile => '../lib/perl5db/t/uncalled-subroutine');
+
+ like ($output,
+ qr/<1,2,3,4,5>\n/,
+ 'uncalled_subroutine was called after s EXPR()',
+ );
+
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+exit(0);
+
+sub uncalled_subroutine
+{
+ print '<', join(',', 1 .. 5), ">\n";
+}