Add tests for history changes fro bash and zsh

This commit is contained in:
nvbn
2015-07-27 17:28:09 +03:00
parent c0002fe6e0
commit 8f6d8b1dd1
5 changed files with 33 additions and 2 deletions
+12
View File
@@ -17,6 +17,18 @@ def with_confirmation(proc):
assert proc.expect([TIMEOUT, u'test'])
def history_changed(proc):
"""Ensures that history changed."""
proc.send('\033[A')
assert proc.expect([TIMEOUT, 'echo test'])
def history_not_changed(proc):
"""Ensures that history not changed."""
proc.send('\033[A')
assert proc.expect([TIMEOUT, 'fuck'])
def refuse_with_confirmation(proc):
"""Ensures that fix can be refused when confirmation enabled."""
proc.sendline(u'mkdir -p ~/.thefuck')