X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/be1dfd826932d471e10a47d0bcbe6195ba4a5c6b..954180176de266c58f236f5297cc4b779a6ba430:/lib/perl5db.t diff --git a/lib/perl5db.t b/lib/perl5db.t index 51b1cf0..81e04d3 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -28,7 +28,7 @@ BEGIN { } } -plan(74); +plan(75); my $rc_filename = '.perldb'; @@ -1670,6 +1670,40 @@ package main; ); } +# Test the { ? and { [command] commands. +{ + my $wrapper = DebugWrap->new( + { + cmds => + [ + q/{ ?/, + q/{ l/, + q/{ ?/, + q/b 5/, + q/c/, + q/q/, + ], + prog => '../lib/perl5db/t/disable-breakpoints-1', + } + ); + + $wrapper->contents_like(qr# + ^No\ pre-debugger\ actions\.\n + .*? + ^pre-debugger\ commands:\n + \s+\{\ --\ l\n + .*? + ^5==>b\s+\$x\ =\ "FirstVal";\n + 6\s*\n + 7:\s+\$dummy\+\+;\n + 8\s*\n + 9:\s+\$x\ =\ "SecondVal";\n + + #msx, + 'Test the pre-prompt debugger commands', + ); +} + END { 1 while unlink ($rc_filename, $out_fn); }