mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 19:22:32 +01:00
#682: Use our own shell logger, fix experimental instant mode on macos
This commit is contained in:
@@ -7,7 +7,8 @@ def _args(**override):
|
||||
args = {'alias': None, 'command': [], 'yes': False,
|
||||
'help': False, 'version': False, 'debug': False,
|
||||
'force_command': None, 'repeat': False,
|
||||
'enable_experimental_instant_mode': False}
|
||||
'enable_experimental_instant_mode': False,
|
||||
'shell_logger': None}
|
||||
args.update(override)
|
||||
return args
|
||||
|
||||
@@ -27,6 +28,9 @@ def _args(**override):
|
||||
(['thefuck', 'git', 'branch', '-a', ARGUMENT_PLACEHOLDER, '-y', '-d'],
|
||||
_args(command=['git', 'branch', '-a'], yes=True, debug=True)),
|
||||
(['thefuck', 'git', 'branch', '-a', ARGUMENT_PLACEHOLDER, '-r', '-d'],
|
||||
_args(command=['git', 'branch', '-a'], repeat=True, debug=True))])
|
||||
_args(command=['git', 'branch', '-a'], repeat=True, debug=True)),
|
||||
(['thefuck', '-l', '/tmp/log'], _args(shell_logger='/tmp/log')),
|
||||
(['thefuck', '--shell-logger', '/tmp/log'],
|
||||
_args(shell_logger='/tmp/log'))])
|
||||
def test_parse(argv, result):
|
||||
assert vars(Parser().parse(argv)) == result
|
||||
|
Reference in New Issue
Block a user