[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] diagnostics: check the handling of tabulations
From: |
Akim Demaille |
Subject: |
[PATCH 3/4] diagnostics: check the handling of tabulations |
Date: |
Sun, 21 Apr 2019 09:41:48 +0200 |
* 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>warning:</warning> empty rule
without %empty [<warning>-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>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
+ a: <warning>{ }</warning>
+ <warning>^~~~~~~~~~~~~~</warning>
+input.y:12.4-17: <warning>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
+ b: <warning>{ }</warning>
+ <warning>^~~~~~~~~~~~~~</warning>
+input.y:13.4-17: <warning>warning:</warning> empty rule without %empty
[<warning>-Wempty-rule</warning>]
+ c: <warning>{------------}</warning>
+ <warning>^~~~~~~~~~~~~~</warning>
+]])
+
+
+
+m4_popdef([AT_TEST])
--
2.21.0
Re: [PATCH 0/4] Fix caret errors, Hans Ã…berg, 2019/04/21