forked from python-mode/python-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_folding.sh
More file actions
36 lines (32 loc) · 1.31 KB
/
test_folding.sh
File metadata and controls
36 lines (32 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/bash
# Note: a solution with unix 'timeout' program was tried but it was unsuccessful. The problem with folding 4 is that in the case of a crash one expects the folding to just stay in an infinite loop, thus never existing with error. An improvement is suggested to this case.
# Source file.
set +e
source ./test_helpers_bash/test_prepare_between_tests.sh
vim --clean -i NONE -u $VIM_TEST_VIMRC -c "source ./test_procedures_vimscript/folding1.vim" $VIM_DISPOSABLE_PYFILE > /dev/null
R1=$?
source ./test_helpers_bash/test_prepare_between_tests.sh
vim --clean -i NONE -u $VIM_TEST_VIMRC -c "source ./test_procedures_vimscript/folding2.vim" $VIM_DISPOSABLE_PYFILE > /dev/null
R2=$?
source ./test_helpers_bash/test_prepare_between_tests.sh
# TODO: enable folding3.vim script back.
# vim --clean -i NONE -u $VIM_TEST_VIMRC -c "source ./test_procedures_vimscript/folding3.vim" $VIM_DISPOSABLE_PYFILE > /dev/null
# R3=$?
source ./test_helpers_bash/test_prepare_between_tests.sh
vim --clean -i NONE -u $VIM_TEST_VIMRC -c "source ./test_procedures_vimscript/folding4.vim" $VIM_DISPOSABLE_PYFILE > /dev/null
R4=$?
set -e
if [[ "$R1" -ne 0 ]]
then
exit 1
elif [[ "$R2" -ne 0 ]]
then
exit 2
# elif [[ "$R3" -ne 0 ]]
# then
# exit 3
elif [[ "$R4" -ne 0 ]]
then
exit 4
fi
# vim: set fileformat=unix filetype=sh wrap tw=0 :