Move tests/test_shells/input.sh to tests/test_shells/input.bash

This commit is contained in:
ZyX 2014-01-13 01:07:13 +04:00
parent 6996896b22
commit 6c27506270
2 changed files with 7 additions and 3 deletions

View File

@ -12,9 +12,11 @@ else
fi
run_test() {
SH="$1"
SESNAME="powerline-shell-test-$$"
screen -L -c tests/test_shells/screenrc -d -m -S "$SESNAME" env LANG=C "$@"
screen -S "$SESNAME" -X readreg a tests/test_shells/input.sh
screen -L -c tests/test_shells/screenrc -d -m -S "$SESNAME" \
env LANG=C BINDFILE="$BINDFILE" "$@"
screen -S "$SESNAME" -X readreg a tests/test_shells/input.$SH
sleep 5s
screen -S "$SESNAME" -p 0 -X width 300 1
screen -S "$SESNAME" -p 0 -X logfile tests/shell/screen.log
@ -26,7 +28,7 @@ run_test() {
-e s/$(cat tests/shell/3rd/pid)/PID/g \
-e "s/$(python -c 'import re, socket; print (re.escape(socket.gethostname()))')/HOSTNAME/g" \
tests/shell/screen.log
if ! diff -u tests/test_shells/${1}.ok tests/shell/screen.log ; then
if ! diff -u tests/test_shells/${SH}.ok tests/shell/screen.log ; then
return 1
fi
return 0
@ -40,5 +42,7 @@ if ! run_test bash --norc --noprofile -i ; then
echo "Failed bash"
FAILED=1
fi
rm tests/shell/screen.log
rm -r tests/shell
exit $FAILED