mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Run tests in nvim as well as vim.
This commit is contained in:
40
test/test
40
test/test
@@ -2,19 +2,26 @@
|
|||||||
|
|
||||||
VIM="/Applications/MacVim.app/Contents/MacOS/Vim -v"
|
VIM="/Applications/MacVim.app/Contents/MacOS/Vim -v"
|
||||||
|
|
||||||
|
status=0
|
||||||
|
|
||||||
# Execute the tests.
|
# Execute the tests.
|
||||||
for testcase in test*.vim; do
|
for editor in "$VIM" nvim; do
|
||||||
$VIM -N -u NONE --cmd 'let g:gitgutter_async=0' -S $testcase -c 'quit!'
|
|
||||||
|
for testcase in test*.vim; do
|
||||||
|
$editor -N -u NONE --cmd 'let g:gitgutter_async=0' -S $testcase -c 'quit!'
|
||||||
|
|
||||||
git reset HEAD fixture.txt > /dev/null
|
git reset HEAD fixture.txt > /dev/null
|
||||||
git checkout fixture.txt
|
git checkout fixture.txt
|
||||||
done
|
done
|
||||||
|
|
||||||
# Verify the results.
|
# Verify the results.
|
||||||
count_ok=0
|
echo "$editor:"
|
||||||
count_fail=0
|
echo
|
||||||
|
|
||||||
for expected in *.expected; do
|
count_ok=0
|
||||||
|
count_fail=0
|
||||||
|
|
||||||
|
for expected in *.expected; do
|
||||||
name=${expected%.*}
|
name=${expected%.*}
|
||||||
actual=$name.actual
|
actual=$name.actual
|
||||||
|
|
||||||
@@ -26,13 +33,18 @@ for expected in *.expected; do
|
|||||||
count_fail=$((count_fail + 1))
|
count_fail=$((count_fail + 1))
|
||||||
echo "$name failed"
|
echo "$name failed"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Print results.
|
||||||
|
echo
|
||||||
|
echo "$((count_ok + count_fail)) tests"
|
||||||
|
echo "$count_ok ok"
|
||||||
|
echo "$count_fail failed"
|
||||||
|
echo
|
||||||
|
|
||||||
|
status=$(($status + $count_fail))
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Print results.
|
exit $status
|
||||||
echo
|
|
||||||
echo "$((count_ok + count_fail)) tests"
|
|
||||||
echo "$count_ok ok"
|
|
||||||
echo "$count_fail failed"
|
|
||||||
|
|
||||||
exit $count_fail
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user