mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-21 04:32:37 +01:00
#N/A Add tests for "ctrl+c"
This commit is contained in:
@@ -11,6 +11,19 @@ def with_confirmation(proc):
|
||||
proc.expect('test')
|
||||
|
||||
|
||||
def refuse_with_confirmation(proc):
|
||||
"""Ensures that fix can be refused when confirmation enabled."""
|
||||
proc.sendline('ehco test')
|
||||
|
||||
proc.sendline('fuck')
|
||||
proc.expect('echo test')
|
||||
proc.expect('enter')
|
||||
proc.expect_exact('ctrl+c')
|
||||
proc.send('\003')
|
||||
|
||||
proc.expect('Aborted')
|
||||
|
||||
|
||||
def without_confirmation(proc):
|
||||
"""Ensures that command can be fixed when confirmation disabled."""
|
||||
proc.sendline('ehco test')
|
||||
|
Reference in New Issue
Block a user