-
-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script for checking no of tabs in TEST-DATA.csv so it never breaks Gi…
…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
1 parent
ce477cc
commit 8b0d96f
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |