mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -1,15 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SPACED=$(grep -REn '^ .+' --include '*.snippets' snippets)
|
||||
check=0
|
||||
|
||||
if [[ $? -ne 1 ]]; then
|
||||
echo These snippet lines are indented with spaces:
|
||||
echo
|
||||
echo "$SPACED"
|
||||
echo
|
||||
echo Tests failed!
|
||||
function test_space_indented {
|
||||
local spaced
|
||||
spaced=$(grep -REn '^ ' --include '*.snippets' snippets)
|
||||
|
||||
if [[ $? -ne 1 ]]; then
|
||||
echo "These snippet lines are indented with spaces:"
|
||||
echo "$spaced"
|
||||
echo
|
||||
(( check++ ))
|
||||
fi
|
||||
}
|
||||
|
||||
function test_snipmate_format {
|
||||
local ultisnips_in_snipmate
|
||||
ultisnips_in_snipmate=$(grep -REn 'endsnippet' --include '*.snippets' snippets)
|
||||
if [[ $? -ne 1 ]]; then
|
||||
echo "These snippet definitions are probably in UltiSnips format but stored in the snipmate directory"
|
||||
echo "$ultisnips_in_snipmate"
|
||||
echo
|
||||
(( check++ ))
|
||||
fi
|
||||
}
|
||||
|
||||
test_space_indented
|
||||
test_snipmate_format
|
||||
|
||||
if [ $check -eq 0 ]; then
|
||||
echo "Tests passed!"
|
||||
exit 0
|
||||
else
|
||||
echo "$check test(s) failed out of 2!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Tests passed!
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user