fix jrnl not behaving nicely with testing suite

This commit is contained in:
Jonathan Wren 2020-05-23 12:25:04 -07:00
parent 3ad9c5e105
commit b5c671c055
2 changed files with 1 additions and 3 deletions

View file

@ -33,13 +33,11 @@ Feature: Basic reading and writing to a journal
When we run "jrnl -n 1"
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
@skip_win
Scenario: Writing an empty entry from the editor
Given we use the config "editor.yaml"
When we open the editor and enter nothing
Then we should see the message "[Nothing saved to file]"
@skip_win
Scenario: Sending an argument with spaces to the editor should work
Given we use the config "editor-args.yaml"
When we open the editor and enter "lorem ipsum"

View file

@ -197,7 +197,7 @@ def parse_args(args=None):
# Handle '-123' as a shortcut for '-n 123'
num = re.compile(r"^-(\d+)$")
if args is None:
args = sys.argv[1:]
args = []
return parser.parse_args([num.sub(r"-n \1", a) for a in args])