fixits: handle %file-prefix

* src/files.h, src/files.c (spec_file_prefix_loc): New.
* src/scan-gram.l (%file-prefix): Delegate diagnostics to...
* src/parse-gram.y (handle_file_prefix): here.
* src/complain.c (duplicate_directive): Quote the directive.
* tests/input.at: Adjust.
This commit is contained in:
Akim Demaille
2019-01-17 06:43:28 +01:00
parent 5879c8dc5a
commit e86adac52d
7 changed files with 51 additions and 16 deletions

View File

@@ -707,8 +707,9 @@ if test "$POSIXLY_CORRECT_IS_EXPORTED" = false; then
# Build expected stderr up to and including the "warnings being
# treated as errors" message.
]AT_DATA([[experr]], [$4])[
$PERL -pi -e 's{(.*): warning: (.*)\[-W(.*)\]$}
{$][1: error: $][2\@<:@-Werror=$][3@:>@}' experr
$PERL -pi -e 's{(.*): warning:}{$][1: error:};' \
-e 's{\[-W(.*)\]$}{@<:@-Werror=$][1@:>@}' \
experr
]AT_CHECK([[sed 's,.*/$,,' stderr 1>&2]], [[0]], [[]], [experr])[
# Now check --warnings=error.