Add first-pass testing framework based on vim's runtest.vim

This commit is contained in:
Ben Jackson 2019-02-17 19:36:21 +00:00
commit 2cfd5afacb
14 changed files with 1043 additions and 184 deletions

31
run_tests Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
RUN_VIM="vim --noplugin --clean --not-a-term"
RUN_TEST="${RUN_VIM} -S run_test.vim"
pushd tests > /dev/null
echo "Running Vimspector Vim tests"
RESULT=0
for t in *.test.vim; do
echo ""
echo "%RUN: $t"
rm -f messages debuglog
if ${RUN_TEST} $t --cmd 'au SwapExists * let v:swapchoice = "e"'; then
echo "%PASS: $t PASSED"
else
cat messages
echo "%FAIL: $t FAILED"
RESULT=1
fi
done
popd > /dev/null
echo ""
echo "All done."
exit $RESULT