Daniel Shahaf wrote on Sat, 30 Dec 2017 10:00 +0000:
> We've got an off-by-one somewhere.
And here's a regression test. It passes if the expectation is "foo ar
az" but fails if the expectation is "foo bar baz".
The patch is attached (rather than inline) because it adds a literal tab
to config-test.cfg.
Index: subversion/tests/libsvn_subr/config-test.c
===================================================================
--- subversion/tests/libsvn_subr/config-test.c (revision 1819564)
+++ subversion/tests/libsvn_subr/config-test.c (working copy)
@@ -70,12 +70,12 @@
}
static const char *config_keys[] = { "foo", "a", "b", "c", "d", "e", "f", "g",
- "h", "i", NULL };
+ "h", "i", "m", NULL };
static const char *config_values[] = { "bar", "Aa", "100", "bar",
"a %(bogus)s oyster bar",
"%(bogus)s shmoo %(",
"%Aa", "lyrical bard", "%(unterminated",
- "Aa 100", NULL };
+ "Aa 100", "foo bar baz", NULL };
static svn_error_t *
test_text_retrieval(const svn_test_opts_t *opts,
Index: subversion/tests/libsvn_subr/config-test.cfg
===================================================================
--- subversion/tests/libsvn_subr/config-test.cfg (revision 1819564)
+++ subversion/tests/libsvn_subr/config-test.cfg (working copy)
@@ -45,6 +45,10 @@
k=c%(j)sy
# Depends on a cyclic definition
l=depends on a %(j)scycle!
+# line continuation
+m = foo
+ bar
+ baz
[UpperCaseSection]
a=Aa