Add zsh functional tests

This commit is contained in:
ZyX 2014-01-13 19:47:58 +04:00
parent 6c27506270
commit d9c62d4796
3 changed files with 22 additions and 1 deletions

View File

@ -9,4 +9,5 @@ if python -c 'import sys; sys.exit(1 * (sys.version_info[0] != 2))' ; then
pip install unittest2 argparse
fi
fi
apt-get install zsh
true

View File

@ -0,0 +1,14 @@
unsetopt promptsp transientrprompt
POWERLINE_COMMAND=( $PWD/scripts/powerline -p $PWD/powerline/config_files ) ; VIRTUAL_ENV=
source powerline/bindings/zsh/powerline.zsh ; cd tests/shell/3rd
POWERLINE_COMMAND=( $POWERLINE_COMMAND -c ext.shell.theme=default_leftonly )
cd .git
cd ..
VIRTUAL_ENV="$HOME/.virtenvs/some-virtual-environment"
VIRTUAL_ENV=
bash -c "echo \$\$>pid ; while true ; do sleep 0.1s ; done" &
false
kill `cat pid` ; sleep 1s
false
POWERLINE_COMMAND=( $POWERLINE_COMMAND -t default_leftonly.segment_data.hostname.args.only_if_ssh=false )
exit

View File

@ -15,7 +15,7 @@ run_test() {
SH="$1"
SESNAME="powerline-shell-test-$$"
screen -L -c tests/test_shells/screenrc -d -m -S "$SESNAME" \
env LANG=C BINDFILE="$BINDFILE" "$@"
env LANG=en_US.UTF-8 BINDFILE="$BINDFILE" "$@"
screen -S "$SESNAME" -X readreg a tests/test_shells/input.$SH
sleep 5s
screen -S "$SESNAME" -p 0 -X width 300 1
@ -44,5 +44,11 @@ if ! run_test bash --norc --noprofile -i ; then
fi
rm tests/shell/screen.log
if ! run_test zsh -f -i ; then
echo "Failed zsh"
FAILED=1
fi
rm tests/shell/screen.log
rm -r tests/shell
exit $FAILED