mirror of
https://github.com/powerline/powerline.git
synced 2025-07-30 01:05:42 +02:00
fix! Allow failing old vim test when running with Python-2.7
This commit is contained in:
parent
3c4ec09281
commit
a92bc72801
@ -15,6 +15,7 @@ export POWERLINE_THEME_OVERRIDES='default.segments.left=[]'
|
|||||||
test_script() {
|
test_script() {
|
||||||
local vim="$1" ; shift
|
local vim="$1" ; shift
|
||||||
local script="$1" ; shift
|
local script="$1" ; shift
|
||||||
|
local allow_failure_arg="$1" ; shift
|
||||||
echo "Running script $script with $vim"
|
echo "Running script $script with $vim"
|
||||||
if ! test -e "$vim" ; then
|
if ! test -e "$vim" ; then
|
||||||
return 0
|
return 0
|
||||||
@ -23,7 +24,8 @@ test_script() {
|
|||||||
|| test -f message.fail
|
|| test -f message.fail
|
||||||
then
|
then
|
||||||
local test_name="${script##*/}"
|
local test_name="${script##*/}"
|
||||||
fail "${test_name%.vim}" F "Failed script $script run with $vim"
|
fail $allow_failure_arg "${test_name%.vim}" \
|
||||||
|
F "Failed script $script run with $vim"
|
||||||
if test -e message.fail ; then
|
if test -e message.fail ; then
|
||||||
cat message.fail >&2
|
cat message.fail >&2
|
||||||
rm message.fail
|
rm message.fail
|
||||||
@ -37,13 +39,19 @@ cd "$TEST_ROOT"
|
|||||||
|
|
||||||
for script in "$TEST_SCRIPT_ROOT"/*.vim ; do
|
for script in "$TEST_SCRIPT_ROOT"/*.vim ; do
|
||||||
if test "${script%.old.vim}" = "${script}" ; then
|
if test "${script%.old.vim}" = "${script}" ; then
|
||||||
test_script "$NEW_VIM" "$script"
|
test_script "$NEW_VIM" "$script" ""
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if test "$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR" = "2.7" ; then
|
||||||
|
ALLOW_FAILURE_ARG=--allow-failure
|
||||||
|
else
|
||||||
|
ALLOW_FAILURE_ARG=
|
||||||
|
fi
|
||||||
|
|
||||||
if test -e "$OLD_VIM" ; then
|
if test -e "$OLD_VIM" ; then
|
||||||
for script in "$TEST_SCRIPT_ROOT"/*.old.vim ; do
|
for script in "$TEST_SCRIPT_ROOT"/*.old.vim ; do
|
||||||
test_script "$OLD_VIM" "$script"
|
test_script "$OLD_VIM" "$script" "$ALLOW_FAILURE_ARG"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user