From b248789b64d6bd277c52bfe608ed3192023af1bd Mon Sep 17 00:00:00 2001 From: "E. Choroba" Date: Fri, 26 Jun 2020 21:19:24 +0200 Subject: After running an action in the debugger, turn it off When running with "c", there was no problem, but when running with "n" or "s", once the action was executed, it kept executing on the following lines, which wasn't expected. Clearing $action here prevents this unwanted behaviour. --- lib/perl5db.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/perl5db.t') diff --git a/lib/perl5db.t b/lib/perl5db.t index 421229a54a..913a301d98 100644 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -2799,6 +2799,28 @@ SKIP: ); } +{ + # GitHub #17901 + my $wrapper = DebugWrap->new( + { + cmds => + [ + 'a 4 $s++', + ('s') x 5, + 'x $s', + 'q' + ], + prog => '../lib/perl5db/t/test-a-statement-3', + switches => [ '-d' ], + stderr => 0, + } + ); + $wrapper->contents_like( + qr/^0 +2$/m, + 'Test that the a command runs only on the given lines.', + ); +} + { # perl 5 RT #126735 regression bug. local $ENV{PERLDB_OPTS} = "NonStop=0 RemotePort=non-existent-host.tld:9001"; -- cgit v1.2.1