powerline/tests/test.sh

28 lines
611 B
Bash
Raw Normal View History

#!/bin/sh
: ${PYTHON:=python}
FAILED=0
export PYTHONPATH="${PYTHONPATH}:`realpath .`"
for file in tests/test_*.py ; do
if ! ${PYTHON} $file --verbose --catch ; then
2014-01-11 10:16:25 +01:00
echo "Failed test(s) from $file"
FAILED=1
fi
done
if ! ${PYTHON} scripts/powerline-lint -p powerline/config_files ; then
2014-01-11 10:16:25 +01:00
echo "Failed powerline-lint"
FAILED=1
fi
for script in tests/*.vim ; do
if ! vim -u NONE -S $script || test -f message.fail ; then
echo "Failed script $script" >&2
cat message.fail >&2
rm message.fail
FAILED=1
fi
done
if ! sh tests/test_shells/test.sh ; then
2014-01-11 10:16:25 +01:00
echo "Failed shells"
FAILED=1
fi
exit $FAILED