From 6b6c3de2aebd305845b4d2344f1da415ec0e2611 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 20 Apr 2019 19:55:26 +0200 Subject: [PATCH] diagnostics: check the handling of tabulations * tests/diagnostics.at (Tabulations): here. --- tests/diagnostics.at | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/diagnostics.at b/tests/diagnostics.at index 1955dad5..606b0373 100644 --- a/tests/diagnostics.at +++ b/tests/diagnostics.at @@ -106,5 +106,30 @@ input.y:17.2: warning: empty rule without %empty [-W ]]) +## ------------- ## +## Tabulations. ## +## ------------- ## -m4_popdef([AT_TEST]) \ No newline at end of file +# Make sure we treat tabulations as eight spaces. + +AT_TEST([[Tabulations]], +[[%% +exp: a b c +a: { } +b: { } +c: {------------} +]], +[[input.y:11.4-17: warning: empty rule without %empty [-Wempty-rule] + a: { } + ^~~~~~~~~~~~~~ +input.y:12.4-17: warning: empty rule without %empty [-Wempty-rule] + b: { } + ^~~~~~~~~~~~~~ +input.y:13.4-17: warning: empty rule without %empty [-Wempty-rule] + c: {------------} + ^~~~~~~~~~~~~~ +]]) + + + +m4_popdef([AT_TEST])