mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: be robust to platforms that support UTF-8 even with LC_ALL=C
Because musl supports UTF-8 with LC_ALL=C, gcc produces: input.y: In function ‘yyparse’: instead of: input.y: In function 'yyparse': Reported by Ferdinand Thiessen. http://lists.gnu.org/archive/html/bug-bison/2015-02/msg00001.html * tests/synclines.at (AT_SYNCLINES_COMPILE): Skip syncline tests when we can't trust error messages issued about a function body.
This commit is contained in:
@@ -136,12 +136,14 @@ EOF
|
||||
m4_define([AT_SYNCLINES_COMPILE],
|
||||
[# Check if we can trust location translation.
|
||||
AT_DATA([syncline.c],
|
||||
[[#error "1"
|
||||
int i; /* avoids -pedantic warning about an empty translation unit. */
|
||||
[[static void foo(void)
|
||||
{
|
||||
#error "3"
|
||||
}
|
||||
]])
|
||||
|
||||
_AT_SYNCLINES_COMPILE([syncline.c])
|
||||
AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
|
||||
AT_CHECK([[test "`cat stdout`" = 'syncline.c:3: @%:@error "3"' || exit 77]])
|
||||
|
||||
# Then work for real.
|
||||
_AT_SYNCLINES_COMPILE([$1])
|
||||
|
||||
Reference in New Issue
Block a user