tests: be robust to quote style.

See <http://lists.gnu.org/archive/html/bug-bison/2012-01/msg00120.html>.

	* src/main.c (main): Define the quoting style we use.
	* tests/atlocal.in: Use ASCII style quotes during the tests.
(cherry picked from commit 39ac121457)
This commit is contained in:
Akim Demaille
2012-02-08 14:44:24 +01:00
parent f0f62c8c4d
commit 06e0e52ca4
2 changed files with 13 additions and 1 deletions

View File

@@ -44,6 +44,7 @@
#include "print.h"
#include "print_graph.h"
#include "print-xml.h"
#include <quote.h>
#include "reader.h"
#include "reduce.h"
#include "scan-code.h"
@@ -54,7 +55,6 @@
#include "uniqstr.h"
int
main (int argc, char *argv[])
{
@@ -64,6 +64,14 @@ main (int argc, char *argv[])
(void) bindtextdomain ("bison-runtime", LOCALEDIR);
(void) textdomain (PACKAGE);
{
char const *cp = getenv ("LC_CTYPE");
if (cp && !strcmp (cp, "C"))
set_custom_quoting (&quote_quoting_options, "'", "'");
else
set_quoting_style (&quote_quoting_options, locale_quoting_style);
}
atexit (close_stdout);
uniqstrs_new ();

View File

@@ -58,3 +58,7 @@ CONF_JAVA='@CONF_JAVA@'
# We need egrep.
: ${EGREP='@EGREP@'}
# Use simple quotes (lib/quote.c).
LC_CTYPE=C
export LC_CTYPE