From 39ac121457237a14437ee7d7bae28e368a201a7a Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 8 Feb 2012 14:44:24 +0100 Subject: [PATCH] tests: be robust to quote style. See . * src/main.c (main): Define the quoting style we use. * tests/atlocal.in: Use ASCII style quotes during the tests. --- gnulib | 2 +- src/main.c | 10 +++++++++- tests/atlocal.in | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gnulib b/gnulib index 50bb21ea..4730c3e3 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 50bb21eab7dfc87bbfcbc75f0232407110cdd296 +Subproject commit 4730c3e3692b344effb72d46b3ff92db0bdb797a diff --git a/src/main.c b/src/main.c index fdb26ac6..11081351 100644 --- a/src/main.c +++ b/src/main.c @@ -44,6 +44,7 @@ #include "print.h" #include "print_graph.h" #include "print-xml.h" +#include #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 && STREQ (cp, "C")) + set_custom_quoting ("e_quoting_options, "'", "'"); + else + set_quoting_style ("e_quoting_options, locale_quoting_style); + } + atexit (close_stdout); uniqstrs_new (); diff --git a/tests/atlocal.in b/tests/atlocal.in index d34c1106..b66e9543 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -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 -- 2.47.2