1
0
Fork 0
mirror of synced 2024-11-15 21:48:57 -05:00
ultimate-vim/sources_non_forked/vim-go/scripts/test.sh

34 lines
450 B
Bash
Raw Normal View History

2017-02-11 08:01:38 -05:00
#!/bin/bash
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
set -e
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
cd $(dirname $0)
2014-10-31 17:30:24 -04:00
2017-03-07 12:04:28 -05:00
# install dependencies
go get github.com/fatih/gomodifytags
2017-02-11 08:01:38 -05:00
# cleanup test.log
if [ -f "test.log" ]; then
rm test.log
fi
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
if [ -f "FAILED" ]; then
rm FAILED
fi
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
for test_file in ../autoload/go/*_test.vim
do
vim -u NONE -S runtest.vim $test_file
done
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
if [ -f "test.log" ]; then
cat test.log
fi
2014-10-31 17:30:24 -04:00
2017-02-11 08:01:38 -05:00
# if Failed exists, test failed
if [ -f "FAILED" ]; then
2014-10-31 17:30:24 -04:00
echo 2>&1 "FAIL"
exit 1
fi
echo 2>&1 "PASS"