mirror of
https://github.com/nvbn/thefuck.git
synced 2024-10-05 18:31:10 +01:00
21 lines
506 B
Python
21 lines
506 B
Python
|
def with_confirmation(proc):
|
||
|
"""Ensures that command can be fixed when confirmation enabled."""
|
||
|
proc.sendline('ehco test')
|
||
|
|
||
|
proc.sendline('fuck')
|
||
|
proc.expect('echo test')
|
||
|
proc.expect('enter')
|
||
|
proc.expect_exact('ctrl+c')
|
||
|
proc.send('\n')
|
||
|
|
||
|
proc.expect('test')
|
||
|
|
||
|
|
||
|
def without_confirmation(proc):
|
||
|
"""Ensures that command can be fixed when confirmation disabled."""
|
||
|
proc.sendline('ehco test')
|
||
|
|
||
|
proc.sendline('fuck')
|
||
|
proc.expect('echo test')
|
||
|
proc.expect('test')
|