Docstring things, change test
- Update the docstring for repeat - Remove the blank line after the docstring - Update the docstring with scripts/dev/src2asciidoc.py - Simplify the test
This commit is contained in:
parent
adb371f305
commit
8e2307c546
@ -919,7 +919,7 @@ Repeat a given command.
|
|||||||
* +'command'+: The command to run, with optional args.
|
* +'command'+: The command to run, with optional args.
|
||||||
|
|
||||||
==== count
|
==== count
|
||||||
Multiplies with 'times' when given
|
Multiplies with 'times' when given.
|
||||||
|
|
||||||
==== note
|
==== note
|
||||||
* This command does not split arguments after the last argument and handles quotes literally.
|
* This command does not split arguments after the last argument and handles quotes literally.
|
||||||
|
@ -81,8 +81,8 @@ def repeat(times: int, command, win_id, count=None):
|
|||||||
Args:
|
Args:
|
||||||
times: How many times to repeat.
|
times: How many times to repeat.
|
||||||
command: The command to run, with optional args.
|
command: The command to run, with optional args.
|
||||||
|
count: Multiplies with 'times' when given.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if count is not None:
|
if count is not None:
|
||||||
times *= count
|
times *= count
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ Feature: Miscellaneous utility commands exposed to the user.
|
|||||||
Then no crash should happen
|
Then no crash should happen
|
||||||
|
|
||||||
Scenario: :repeat with count
|
Scenario: :repeat with count
|
||||||
When I run :run-with-count 2 repeat 3 message-info "repeat-test 3"
|
When I run :repeat 3 message-info "repeat-test 3" with count 2
|
||||||
Then the message "repeat-test 3" should be shown
|
Then the message "repeat-test 3" should be shown
|
||||||
And the message "repeat-test 3" should be shown
|
And the message "repeat-test 3" should be shown
|
||||||
And the message "repeat-test 3" should be shown
|
And the message "repeat-test 3" should be shown
|
||||||
|
Loading…
Reference in New Issue
Block a user