Skip to content

Commit

Permalink
Adds a test to check regressions in parser
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
  • Loading branch information
rafael committed Jan 16, 2019
1 parent b776864 commit 7c36faa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/check_make_parser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ if ! cd go/vt/sqlparser/ ; then
fi

mv $CUR $TMP
goyacc -o $CUR sql.y
output=`goyacc -o $CUR sql.y`

if [ -n "$output" ]; then
echo "Expected empty output from goyacc, got:"
echo $output
mv $TMP $CUR
exit 1
fi

gofmt -w $CUR

if ! diff -q $CUR $TMP > /dev/null ; then
Expand Down

0 comments on commit 7c36faa

Please sign in to comment.