summaryrefslogtreecommitdiff
path: root/tests/regression.at
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-04-22 07:52:38 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-04-23 18:29:10 +0200
commita9b350fb3adf8e4510d7ca7bf111161bdf713a33 (patch)
tree803cc13177992c27a36973d3358c1dcf6802397f /tests/regression.at
parentafe7dfd3b97bfbc7165d9035ba1473096ca4570e (diff)
downloadbison-a9b350fb3adf8e4510d7ca7bf111161bdf713a33.tar.gz
diagnostics: copy GCC9's format
Currently, when we quote the source file, we indent it with one space, and preserve tabulations, so there is a discrepancy and the visual rendering is bad. One way out is to indent with a tab instead of a space, but then this space can be used for more information. This is what GCC9 does. Let's play copy cats. See https://lists.gnu.org/archive/html/bison-patches/2019-04/msg00025.html https://developers.redhat.com/blog/2019/03/08/usability-improvements-in-gcc-9/ https://gcc.gnu.org/onlinedocs/gccint/Guidelines-for-Diagnostics.html#Guidelines-for-Diagnostics * src/location.c (location_caret): Prefix quoted lines with the line number and a pipe, fitting 8 columns. * tests/actions.at, tests/c++.at, tests/conflicts.at, * tests/diagnostics.at, tests/input.at, tests/java.at, * tests/named-refs.at, tests/reduce.at, tests/regression.at, * tests/sets.at: Adjust expectations. Partly by "./build-aux/update-test tests/testsuite.dir/*/testsuite.log" repeatedly, and partly by hand.
Diffstat (limited to 'tests/regression.at')
-rw-r--r--tests/regression.at8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/regression.at b/tests/regression.at
index abbafe49..bf0b4754 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -404,11 +404,11 @@ input.y:22.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used
AT_BISON_CHECK([-fcaret -o input.c input.y], [[0]], [[]],
[[input.y:22.8-14: warning: symbol SPECIAL redeclared [-Wother]
- %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
- ^~~~~~~
+ 22 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
+ | ^~~~~~~
input.y:22.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used more than once as a literal string [-Wother]
- %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 22 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
]])
AT_COMPILE([input])