+2016-10-16 Pádraig Brady <P@draigBrady.com>
+
+ quotearg: fix stale tests
+ * tests/test-quotearg.c [locale_results]: Add the missing str7
+ entries to the expected results.
+ tests/test-system-quote-main.c (check_one): Don't enforce that we
+ don't write beyond the returned length, since that's no longer the
+ case if we switch to a more concise quoting style.
+ * tests/test-sh-quote.c (check_one): Likewise.
+ (main): Adjust for the new more concise quoting style.
+ Reported by Bruno Haible.
+
2016-10-16 Jim Meyering <meyering@fb.com>
non-recursive-gnulib-prefix-hack: fix inconsequential typo
/* locale_quoting_style */
{ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ},
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ},
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } },
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } },
/* clocale_quoting_style */
{ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
{ LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
- LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } }
+ LQ "a' b" RQ, LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } }
};
#endif /* ENABLE_NLS */
ASSERT (output_len <= sizeof (buf) - 2);
memset (buf, '\0', output_len + 1);
- buf[output_len + 1] = '%';
bufend = shell_quote_copy (buf, input);
ASSERT (bufend == buf + output_len);
ASSERT (memcmp (buf, output, output_len + 1) == 0);
- ASSERT (buf[output_len + 1] == '%');
ASSERT (strcmp (output, expected) == 0);
check_one ("&", "'&'");
/* "'" would be interpreted as the start of a string. */
- check_one ("'foo'bar", "''\\''foo'\\''bar'"); /* or "\"'foo'bar\"" */
+ check_one ("'foo'bar", "\"'foo'bar\"");
/* '(' at the beginning of argv[0] would introduce a subshell command. */
check_one ("(", "'('");
ASSERT (output_len <= sizeof (buf) - 2);
memset (buf, '\0', output_len + 1);
- buf[output_len + 1] = '%';
bufend = system_quote_copy (buf, interpreter, input);
ASSERT (bufend == buf + output_len);
ASSERT (memcmp (buf, output, output_len + 1) == 0);
- ASSERT (buf[output_len + 1] == '%');
/* Store INPUT in EXPECTED_DATA_FILE, for verification by the child
process. */