mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
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.
This commit is contained in:
2
gnulib
2
gnulib
Submodule gnulib updated: 50bb21eab7...4730c3e369
10
src/main.c
10
src/main.c
@@ -44,6 +44,7 @@
|
|||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "print_graph.h"
|
#include "print_graph.h"
|
||||||
#include "print-xml.h"
|
#include "print-xml.h"
|
||||||
|
#include <quote.h>
|
||||||
#include "reader.h"
|
#include "reader.h"
|
||||||
#include "reduce.h"
|
#include "reduce.h"
|
||||||
#include "scan-code.h"
|
#include "scan-code.h"
|
||||||
@@ -54,7 +55,6 @@
|
|||||||
#include "uniqstr.h"
|
#include "uniqstr.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -64,6 +64,14 @@ main (int argc, char *argv[])
|
|||||||
(void) bindtextdomain ("bison-runtime", LOCALEDIR);
|
(void) bindtextdomain ("bison-runtime", LOCALEDIR);
|
||||||
(void) textdomain (PACKAGE);
|
(void) textdomain (PACKAGE);
|
||||||
|
|
||||||
|
{
|
||||||
|
char const *cp = getenv ("LC_CTYPE");
|
||||||
|
if (cp && STREQ (cp, "C"))
|
||||||
|
set_custom_quoting ("e_quoting_options, "'", "'");
|
||||||
|
else
|
||||||
|
set_quoting_style ("e_quoting_options, locale_quoting_style);
|
||||||
|
}
|
||||||
|
|
||||||
atexit (close_stdout);
|
atexit (close_stdout);
|
||||||
|
|
||||||
uniqstrs_new ();
|
uniqstrs_new ();
|
||||||
|
|||||||
@@ -58,3 +58,7 @@ CONF_JAVA='@CONF_JAVA@'
|
|||||||
|
|
||||||
# We need egrep.
|
# We need egrep.
|
||||||
: ${EGREP='@EGREP@'}
|
: ${EGREP='@EGREP@'}
|
||||||
|
|
||||||
|
# Use simple quotes (lib/quote.c).
|
||||||
|
LC_CTYPE=C
|
||||||
|
export LC_CTYPE
|
||||||
|
|||||||
Reference in New Issue
Block a user