From 7c36faa8854b59d6fe20c73f670e6fa8e1bc7835 Mon Sep 17 00:00:00 2001 From: Rafael Chacon Date: Tue, 15 Jan 2019 09:57:12 -0800 Subject: [PATCH] Adds a test to check regressions in parser Signed-off-by: Rafael Chacon --- tools/check_make_parser.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/check_make_parser.sh b/tools/check_make_parser.sh index 577b881dce6..139e18199a8 100755 --- a/tools/check_make_parser.sh +++ b/tools/check_make_parser.sh @@ -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