Add zsh functional tests
This commit is contained in:
parent
6c27506270
commit
d9c62d4796
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue