1 /* Test of quotearg family of functions.
2 Copyright (C) 2008-2009 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 /* Written by Eric Blake <ebb9@byu.net>, 2008. */
35 #define ASSERT(expr) \
40 fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
47 struct result_strings {
48 char const *str1; /* Translation of "". */
49 char const *str2; /* Translation of "\0""1\0". */
50 size_t len2; /* Length of str2. */
51 char const *str3; /* Translation of "simple". */
52 char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
53 char const *str5; /* Translation of "a:b". */
54 char const *str6; /* Translation of "a\\b". */
55 char const *str7a; /* Translation of LQ RQ, in ASCII charset. */
56 char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
59 struct result_groups {
60 struct result_strings group1; /* Via quotearg_buffer. */
61 struct result_strings group2; /* Via quotearg{,_mem}. */
62 struct result_strings group3; /* Via quotearg_colon{,_mem}. */
65 /* These quotes are borrowed from a pt_PT.utf8 translation. */
66 # define LQ "\302\253"
67 # define RQ "\302\273"
68 # define LQ_ENC "\\302\\253"
69 # define RQ_ENC "\\302\\273"
70 # define RQ_ESC "\\\302\273"
72 static struct result_strings inputs = {
73 "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
77 static struct result_groups results_g[] = {
78 /* literal_quoting_style */
79 { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
81 { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
83 { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
86 /* shell_quoting_style */
87 { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
88 "'a\\b'", LQ RQ, LQ RQ },
89 { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
90 "'a\\b'", LQ RQ, LQ RQ },
91 { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
92 "'a\\b'", LQ RQ, LQ RQ } },
94 /* shell_always_quoting_style */
95 { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
96 "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
97 { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
98 "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
99 { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
100 "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
102 /* c_quoting_style */
103 { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
104 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
105 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
106 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
107 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
108 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
109 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
110 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
111 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
113 /* c_maybe_quoting_style */
114 { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
115 "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
116 { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
117 "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
118 { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
119 "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
121 /* escape_quoting_style */
122 { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
123 "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
124 { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
125 "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
126 { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
127 "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
129 /* locale_quoting_style */
130 { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
131 "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
132 { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
133 "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
134 { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
135 "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } },
137 /* clocale_quoting_style */
138 { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
139 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
140 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
141 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
142 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
143 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
144 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
145 "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
146 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
149 static struct result_groups flag_results[] = {
150 /* literal_quoting_style and QA_ELIDE_NULL_BYTES */
151 { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
153 { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
155 { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
158 /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
159 { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
160 "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
161 { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
162 "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
163 { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
164 "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
166 /* c_quoting_style and QA_SPLIT_TRIGRAPHS */
167 { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
168 "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
169 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
170 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
171 "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
172 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
173 { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
174 "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
175 "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
180 static struct result_groups locale_results[] = {
181 /* locale_quoting_style */
182 { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
183 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
184 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
185 { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
186 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
187 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ},
188 { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
189 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
190 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } },
192 /* clocale_quoting_style */
193 { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
194 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
195 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
196 { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
197 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
198 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
199 { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
200 LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
201 LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } }
204 #endif /* ENABLE_NLS */
206 static char const *custom_quotes[][2] = {
216 static struct result_groups custom_results[] = {
217 /* left_quote = right_quote = "" */
218 { { "", "\\0001\\0", 7, "simple",
219 " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
220 LQ_ENC RQ_ENC, LQ RQ },
221 { "", "\\0001\\0", 7, "simple",
222 " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
223 LQ_ENC RQ_ENC, LQ RQ },
224 { "", "\\0001\\0", 7, "simple",
225 " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
226 LQ_ENC RQ_ENC, LQ RQ } },
228 /* left_quote = right_quote = "'" */
229 { { "''", "'\\0001\\0'", 9, "'simple'",
230 "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
231 "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
232 { "''", "'\\0001\\0'", 9, "'simple'",
233 "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
234 "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
235 { "''", "'\\0001\\0'", 9, "'simple'",
236 "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
237 "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
239 /* left_quote = "(" and right_quote = ")" */
240 { { "()", "(\\0001\\0)", 9, "(simple)",
241 "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
242 "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
243 { "()", "(\\0001\\0)", 9, "(simple)",
244 "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
245 "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
246 { "()", "(\\0001\\0)", 9, "(simple)",
247 "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
248 "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
250 /* left_quote = ":" and right_quote = " " */
251 { { ": ", ":\\0001\\0 ", 9, ":simple ",
252 ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
253 ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
254 { ": ", ":\\0001\\0 ", 9, ":simple ",
255 ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
256 ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
257 { ": ", ":\\0001\\0 ", 9, ":simple ",
258 ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
259 ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
261 /* left_quote = " " and right_quote = ":" */
262 { { " :", " \\0001\\0:", 9, " simple:",
263 " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
264 " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
265 { " :", " \\0001\\0:", 9, " simple:",
266 " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
267 " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
268 { " :", " \\0001\\0:", 9, " simple:",
269 " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
270 " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
272 /* left_quote = "# " and right_quote = "\n" */
273 { { "# \n", "# \\0001\\0\n", 10, "# simple\n",
274 "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
275 "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
276 { "# \n", "# \\0001\\0\n", 10, "# simple\n",
277 "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
278 "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
279 { "# \n", "# \\0001\\0\n", 10, "# simple\n",
280 "# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
281 "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
283 /* left_quote = "\"'" and right_quote = "'\"" */
284 { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
285 "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
286 "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
287 { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
288 "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
289 "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
290 { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
291 "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
292 "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
296 compare (char const *a, size_t la, char const *b, size_t lb)
299 ASSERT (memcmp (a, b, la) == 0);
300 ASSERT (b[lb] == '\0');
304 compare_strings (char *(func) (char const *, size_t *),
305 struct result_strings *results, bool ascii_only)
311 p = func (inputs.str1, &len);
312 compare (results->str1, strlen (results->str1), p, len);
315 p = func (inputs.str2, &len);
316 compare (results->str2, results->len2, p, len);
319 p = func (inputs.str3, &len);
320 compare (results->str3, strlen (results->str3), p, len);
322 len = strlen (inputs.str4);
323 p = func (inputs.str4, &len);
324 compare (results->str4, strlen (results->str4), p, len);
327 p = func (inputs.str5, &len);
328 compare (results->str5, strlen (results->str5), p, len);
330 len = strlen (inputs.str6);
331 p = func (inputs.str6, &len);
332 compare (results->str6, strlen (results->str6), p, len);
334 len = strlen (inputs.str7a);
335 p = func (inputs.str7a, &len);
337 compare (results->str7a, strlen (results->str7a), p, len);
339 compare (results->str7b, strlen (results->str7b), p, len);
343 use_quotearg_buffer (const char *str, size_t *len)
345 static char buf[100];
347 memset (buf, 0xa5, 100);
348 size = quotearg_buffer (buf, 100, str, *len, NULL);
350 ASSERT ((unsigned char) buf[size + 1] == 0xa5);
355 use_quotearg (const char *str, size_t *len)
357 char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len);
363 use_quote_double_quotes (const char *str, size_t *len)
365 char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
366 : quotearg_char_mem (str, *len, '"');
372 use_quotearg_colon (const char *str, size_t *len)
374 char *p = (*len == SIZE_MAX ? quotearg_colon (str)
375 : quotearg_colon_mem (str, *len));
381 main (int argc _UNUSED_PARAMETER_, char *argv[])
384 bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
386 set_program_name (argv[0]);
388 /* This part of the program is hard-wired to the C locale since it
389 does not call setlocale. However, according to POSIX, the use of
390 8-bit bytes in a character context in the C locale gives
391 unspecified results (that is, the C locale charset is allowed to
392 be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit
393 bytes being characters [often ISO-8859-1], or multibyte [often
394 UTF-8]). We assume that the latter two cases will be
395 indistinguishable in this test - that is, the LQ and RQ sequences
396 will pass through unchanged in either type of charset. So when
397 testing for quoting of str7, use the ascii_only flag to decide
398 what to expect for the 8-bit data being quoted. */
399 ASSERT (!isprint ('\033'));
400 for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
402 set_quoting_style (NULL, i);
403 compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
404 compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
405 if (i == c_quoting_style)
406 compare_strings (use_quote_double_quotes, &results_g[i].group2,
408 compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
411 set_quoting_style (NULL, literal_quoting_style);
412 ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
413 compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only);
414 compare_strings (use_quotearg, &flag_results[0].group2, ascii_only);
415 compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only);
417 set_quoting_style (NULL, c_quoting_style);
418 ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
419 == QA_ELIDE_NULL_BYTES);
420 compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only);
421 compare_strings (use_quotearg, &flag_results[1].group2, ascii_only);
422 compare_strings (use_quote_double_quotes, &flag_results[1].group2,
424 compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only);
426 ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
427 == QA_ELIDE_OUTER_QUOTES);
428 compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only);
429 compare_strings (use_quotearg, &flag_results[2].group2, ascii_only);
430 compare_strings (use_quote_double_quotes, &flag_results[2].group2,
432 compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only);
434 ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
436 for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i)
438 set_custom_quoting (NULL,
439 custom_quotes[i][0], custom_quotes[i][1]);
440 compare_strings (use_quotearg_buffer, &custom_results[i].group1,
442 compare_strings (use_quotearg, &custom_results[i].group2, ascii_only);
443 compare_strings (use_quotearg_colon, &custom_results[i].group3,
448 /* Clean up environment. */
449 unsetenv ("LANGUAGE");
451 unsetenv ("LC_MESSAGES");
452 unsetenv ("LC_CTYPE");
454 unsetenv ("OUTPUT_CHARSET");
456 /* This program part runs in a French UTF-8 locale. It uses
457 the test-quotearg.mo message catalog. */
459 const char *locale_name = getenv ("LOCALE");
461 if (locale_name != NULL && strcmp (locale_name, "none") != 0
462 && setenv ("LC_ALL", locale_name, 1) == 0
463 && setlocale (LC_ALL, "") != NULL)
465 textdomain ("test-quotearg");
466 bindtextdomain ("test-quotearg", getenv ("LOCALEDIR"));
468 set_quoting_style (NULL, locale_quoting_style);
469 compare_strings (use_quotearg_buffer, &locale_results[0].group1, false);
470 compare_strings (use_quotearg, &locale_results[0].group2, false);
471 compare_strings (use_quotearg_colon, &locale_results[0].group3, false);
473 set_quoting_style (NULL, clocale_quoting_style);
474 compare_strings (use_quotearg_buffer, &locale_results[1].group1, false);
475 compare_strings (use_quotearg, &locale_results[1].group2, false);
476 compare_strings (use_quotearg_colon, &locale_results[1].group3, false);
479 #endif /* ENABLE_NLS */