Skip to content

Commit

Permalink
Script for checking no of tabs in TEST-DATA.csv so it never breaks Gi…
Browse files Browse the repository at this point in the history
…tHub preview (#39)

* Check for equal number of tabs on each line of TEST-DATA.tsv

* Fix script name

* Move to tests
  • Loading branch information
TomasHubelbauer authored and fulldecent committed Jan 17, 2018
1 parent ce477cc commit 8b0d96f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
before_install: chmod +x tests/check-lines.sh
install: true
script: ./tests/check-lines.sh
11 changes: 11 additions & 0 deletions tests/check-lines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
UNIQUE_TAB_LINES_COUNT=$(sed 's/[^\t]//g' TEST-DATA.tsv | sort -u | wc -l)

if [ $UNIQUE_TAB_LINES_COUNT -eq "1" ]
then
echo "All lines have the same number of tabs. All good!"
else
echo "Not all lines have the same number of tabs."
echo $UNIQUE_TAB_LINES_COUNT
exit 1
fi

0 comments on commit 8b0d96f

Please sign in to comment.