Add test for incorrect indentation, add Travis CI

This commit is contained in:
Louis Pilfold 2015-05-30 19:54:33 +01:00
parent 2c40fab028
commit abdd057851
2 changed files with 23 additions and 0 deletions

8
.travis.yml Normal file
View File

@ -0,0 +1,8 @@
language: c
sudo: false
notifications:
email: false
script:
- ./tests.sh

15
tests.sh Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
SPACED=$(grep -REn '^ .+' --include '*.snippets' snippets);
if [[ -n SPACED ]]; then
echo These snippet lines are indented with spaces:;
echo;
echo "$SPACED";
echo;
echo Tests failed!
exit 1;
fi
echo Tests passed!
exit 0;