1 Star 0 Fork 0

killf/python-mode

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.sh 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
Lie Ryan 提交于 2020-04-26 07:17 +08:00 . Add test for textobjects selection
#! /bin/bash
# Check before starting.
set -e
which vim 1>/dev/null 2>/dev/null
cd $(dirname $0)
# Source common variables.
source ./test_helpers_bash/test_variables.sh
# Prepare tests by cleaning up all files.
source ./test_helpers_bash/test_prepare_once.sh
# Initialize permanent files..
source ./test_helpers_bash/test_createvimrc.sh
# Execute tests.
declare -a TEST_ARRAY=(
"./test_bash/test_autopep8.sh"
"./test_bash/test_autocommands.sh"
"./test_bash/test_folding.sh"
"./test_bash/test_textobject.sh"
)
## now loop through the above array
set +e
for ONE_TEST in "${TEST_ARRAY[@]}"
do
echo "Starting test: $ONE_TEST" >> $VIM_OUTPUT_FILE
bash -x "$ONE_TEST"
echo -e "\n$ONE_TEST: Return code: $?" >> $VIM_OUTPUT_FILE
bash ./test_helpers_bash/test_prepare_between_tests.sh
done
# Show errors:
E1=$(grep -E "^E[0-9]+:" $VIM_OUTPUT_FILE)
E2=$(grep -E "^Error" $VIM_OUTPUT_FILE)
E3="$E1\n$E2"
if [ "$E3" = "\n" ]
then
echo "No errors."
else
echo "Errors:"
echo -e "$E3\n"
fi
# Show return codes.
RETURN_CODES=$(cat $VIM_OUTPUT_FILE | grep -i "Return code")
echo -e "${RETURN_CODES}"
# Exit the script with error if there are any return codes different from 0.
if echo $RETURN_CODES | grep -E "Return code: [1-9]" 1>/dev/null 2>/dev/null
then
exit 1
else
exit 0
fi
# vim: set fileformat=unix filetype=sh wrap tw=0 :
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/killf/python-mode.git
git@gitee.com:killf/python-mode.git
killf
python-mode
python-mode
develop

搜索帮助