1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-13 22:28:33 +00:00

#682: Fix functional tests for experimental instant mode

This commit is contained in:
Vladimir Iakovlev 2017-10-08 17:16:15 +02:00
parent 1ab0e80f8f
commit 3253b0e789
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export SHELL=/bin/bash
export PS1="$ "
echo > $HISTFILE
eval $(thefuck --alias {})
echo "instant mode ready: $THEFUCK_INSTANT_MODE"
' > ~/.bashrc'''
@ -32,6 +33,8 @@ def proc(request, spawnu, TIMEOUT):
proc.sendline(init_bashrc.format(
u'--enable-experimental-instant-mode' if instant_mode else ''))
proc.sendline(u"bash")
if instant_mode:
assert proc.expect([TIMEOUT, u'instant mode ready: True'])
return proc

View File

@ -25,6 +25,7 @@ export SAVEHIST=100
export HISTSIZE=100
eval $(thefuck --alias {})
setopt INC_APPEND_HISTORY
echo "instant mode ready: $THEFUCK_INSTANT_MODE"
' > ~/.zshrc'''
@ -39,6 +40,8 @@ def proc(request, spawnu, TIMEOUT):
proc.sendline(init_zshrc.format(
u'--enable-experimental-instant-mode' if instant_mode else ''))
proc.sendline(u"zsh")
if instant_mode:
assert proc.expect([TIMEOUT, u'instant mode ready: True'])
return proc