Skip to content

Commit a80e7af

Browse files
committed
Remove the last traces of the no longer existing cmd_l command
cmd_l was still mentioned in the documentation and comments. Also, there was no test for the "v" command which would test #18900.
1 parent 60c8232 commit a80e7af

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

lib/perl5db.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,7 +2544,7 @@ sub _DB__handle_i_command {
25442544
next CMD;
25452545
}
25462546

2547-
=head3 C<cmd_l> - list lines (command)
2547+
=head3 C<_cmd_l_main> - list lines (command)
25482548
25492549
Most of the command is taken up with transforming all the different line
25502550
specification syntaxes into 'start-stop'. After that is done, the command
@@ -6001,7 +6001,7 @@ sub cmd_O {
60016001
=head3 C<cmd_v> - view window (command)
60026002
60036003
Uses the C<$preview> variable set in the second C<BEGIN> block (q.v.) to
6004-
move back a few lines to list the selected line in context. Uses C<cmd_l>
6004+
move back a few lines to list the selected line in context. Uses C<_cmd_l_main>
60056005
to do the actual listing after figuring out the range of line to request.
60066006
60076007
=cut
@@ -6027,7 +6027,7 @@ sub cmd_v {
60276027
# Back up by the context amount.
60286028
$start -= $preview;
60296029

6030-
# Put together a linespec that cmd_l will like.
6030+
# Put together a linespec that _cmd_l_main will like.
60316031
$line = $start . '-' . ( $start + $incr );
60326032

60336033
# List the lines.

lib/perl5db.t

100644100755
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,6 +3051,25 @@ SKIP:
30513051
);
30523052
}
30533053

3054+
{
3055+
# gh #19170
3056+
my $wrapper = DebugWrap->new(
3057+
{
3058+
cmds =>
3059+
[
3060+
'v',
3061+
'q',
3062+
],
3063+
prog => '-e1',
3064+
}
3065+
);
3066+
3067+
$wrapper->contents_like(
3068+
qr/1==>\t1\n/,
3069+
q/v works/,
3070+
);
3071+
}
3072+
30543073
SKIP:
30553074
{
30563075
$Config{usethreads}

0 commit comments

Comments
 (0)