From 3253b0e789a6e8d0fbe04c1d8914923c608aeb58 Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Sun, 8 Oct 2017 17:16:15 +0200 Subject: [PATCH] #682: Fix functional tests for experimental instant mode --- tests/functional/test_bash.py | 3 +++ tests/functional/test_zsh.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/functional/test_bash.py b/tests/functional/test_bash.py index df697a70..dbb6fed2 100644 --- a/tests/functional/test_bash.py +++ b/tests/functional/test_bash.py @@ -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 diff --git a/tests/functional/test_zsh.py b/tests/functional/test_zsh.py index 72be1526..f8ea2af5 100644 --- a/tests/functional/test_zsh.py +++ b/tests/functional/test_zsh.py @@ -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