vimrc/sources_non_forked/vim-snippets/tests.sh

16 lines
249 B
Bash
Raw Normal View History

2015-07-13 10:22:46 +00:00
#!/usr/bin/env bash
2015-12-08 13:20:04 +00:00
SPACED=$(grep -REn '^ .+' --include '*.snippets' snippets)
2015-07-13 10:22:46 +00:00
if [[ $? -ne 1 ]]; then
2015-12-08 13:20:04 +00:00
echo These snippet lines are indented with spaces:
echo
echo "$SPACED"
echo
2015-07-13 10:22:46 +00:00
echo Tests failed!
2015-12-08 13:20:04 +00:00
exit 1
2015-07-13 10:22:46 +00:00
fi
echo Tests passed!
2015-12-08 13:20:04 +00:00
exit 0