* tests/regression.at (Invalid CPP headers): New.

From Alexander Belopolsky.
* src/files.c (compute_header_macro): Map non alnum chars to `_'.
This commit is contained in:
Akim Demaille
2001-10-02 16:17:41 +00:00
parent f1394282f0
commit d9302e4b73
4 changed files with 51 additions and 25 deletions

View File

@@ -107,3 +107,25 @@ input.y:3: fatal error: no rules in the input grammar
])
AT_CLEANUP
## --------------------- ##
## Invalid CPP headers. ##
## --------------------- ##
AT_SETUP([Invalid CPP headers])
mkdir input
AT_DATA([input/input.y],
[%%
dummy:
])
AT_CHECK([bison --defines input/input.y])
AT_CHECK([sed 1q input/input.tab.h], 0,
[[#ifndef INPUT_INPUT_TAB_H
]])
AT_CLEANUP(input)