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:
farlusiva 2018-08-11 19:32:41 +02:00
parent adb371f305
commit 8e2307c546
3 changed files with 3 additions and 3 deletions

View File

@ -919,7 +919,7 @@ Repeat a given command.
* +'command'+: The command to run, with optional args.
==== count
Multiplies with 'times' when given
Multiplies with 'times' when given.
==== note
* This command does not split arguments after the last argument and handles quotes literally.

View File

@ -81,8 +81,8 @@ def repeat(times: int, command, win_id, count=None):
Args:
times: How many times to repeat.
command: The command to run, with optional args.
count: Multiplies with 'times' when given.
"""
if count is not None:
times *= count

View File

@ -42,7 +42,7 @@ Feature: Miscellaneous utility commands exposed to the user.
Then no crash should happen
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
And the message "repeat-test 3" should be shown
And the message "repeat-test 3" should be shown