#! /bin/bash# Check before starting.set -ewhich vim 1>/dev/null 2>/dev/nullcd $(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 arrayset +efor ONE_TEST in "${TEST_ARRAY[@]}"doecho "Starting test: $ONE_TEST" >> $VIM_OUTPUT_FILEbash -x "$ONE_TEST"echo -e "\n$ONE_TEST: Return code: $?" >> $VIM_OUTPUT_FILEbash ./test_helpers_bash/test_prepare_between_tests.shdone# 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" ]thenecho "No errors."elseecho "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/nullthenexit 1elseexit 0fi# vim: set fileformat=unix filetype=sh wrap tw=0 :
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。