Skip to contentSkip to conversation

t/t1300-repo-config.sh: value continued on next line

PATCH New Jakub Narebski 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t/t1300-repo-config.sh: value continued on next line

Documentation/config.txt:
Variable value ending in a '\' is continued on the next line in the customary UNIX fashion.

Test it.

---
 t/t1300-repo-config.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
t/t1300-repo-config.sh +20 -0
index eb7455b..5210aa2 100755
@@ -424,5 +424,25 @@ newline 123'
 test_expect_success 'value with newline' 'git repo-config key.sub value.with\\\
 newline'
 
+cat > .git/config << EOF
+[section]
+	; comment \\
+	continued = cont\\
+inued
+	noncont   = not continued ; \\
+	quotecont = "cont;\\
+inued"
+EOF
+
+cat > expect <<EOF
+section.continued=continued
+section.noncont=not continued
+section.quotecont=cont;inued
+EOF
+
+git repo-config --list > result
+
+test_expect_success 'value continued on next line' 'cmp result expect'
+
 test_done
 
Signature · 1 line
1.4.4.4