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/test-l-statement-1 Tests for the Perl debugger
+lib/perl5db/t/test-r-statement 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
# Debugger for Perl 5.00x; perl5db.pl patch level:
use vars qw($VERSION $header);
-$VERSION = '1.39_01';
+$VERSION = '1.39_02';
$header = "perl5db.pl version $VERSION";
local (*dbline) = $main::{ '_<' . $filename };
# Last line in the program.
- my $max = $#dbline;
+ $max = $#dbline;
# if we have something here, see if we should break.
if ( $dbline{$line}
print $OUT "Deleting all actions...\n";
for my $file ( keys %had_breakpoints ) {
local *dbline = $main::{ '_<' . $file };
- my $max = $#dbline;
+ $max = $#dbline;
my $was;
for ( $i = 1 ; $i <= $max ; $i++ ) {
if ( defined $dbline{$i} ) {
# Switch to the desired file temporarily.
local *dbline = $main::{ '_<' . $file };
- my $max = $#dbline;
+ $max = $#dbline;
my $was;
# For all lines in this file ...
local *dbline = $main::{ '_<' . $file };
# Set up to look through the whole file.
- my $max = $#dbline;
+ $max = $#dbline;
my $was; # Flag: did we print something
# in this file?
$had_breakpoints{$file} |= 1;
# Last line in file.
- my $max = $#dbline;
+ $max = $#dbline;
# Search forward until we hit a breakable line or get to
# the end of the file.
# Switch to the desired file temporarily.
local *dbline = $main::{ '_<' . $file };
- my $max = $#dbline;
+ $max = $#dbline;
my $was;
# For all lines in this file ...
}
}
-plan(32);
+plan(34);
my $rc_filename = '.perldb';
);
}
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 14',
+ 'c',
+ '$flag = 1;',
+ 'r',
+ 'print "Var=$var\n";',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/test-r-statement',
+ }
+ );
+
+ $wrapper->output_like(
+ qr/
+ ^Foo$
+ .*?
+ ^Bar$
+ .*?
+ ^Var=Test$
+ /msx,
+ 'r statement is working properly.',
+ );
+}
+
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'l',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/test-l-statement-1',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/
+ ^1==>\s+\$x\ =\ 1;\n
+ 2:\s+print\ "1\\n";\n
+ 3\s*\n
+ 4:\s+\$x\ =\ 2;\n
+ 5:\s+print\ "2\\n";\n
+ /msx,
+ 'l statement is working properly (test No. 1).',
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}