diff options
Diffstat (limited to 't/t1300-config.sh')
| -rwxr-xr-x | t/t1300-config.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh index f4bd69512e..9b65d9eaf5 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -161,14 +161,32 @@ test_expect_success 'replace with non-match (actually matching)' ' cat > expect << EOF [section] - penguin = very blue Movie = BadPhysics UPPERCASE = true - penguin = kingpin + penguin = gentoo # Pygoscelis papua + disposition = peckish # find fish + foo = bar #abc + spsp = value # and comment + htsp = value # and comment [Sections] WhatEver = Second EOF +test_expect_success 'append comments' ' + git config --replace-all --comment="Pygoscelis papua" section.penguin gentoo && + git config --comment="find fish" section.disposition peckish && + git config --comment="#abc" section.foo bar && + + git config --comment="and comment" section.spsp value && + git config --comment=" # and comment" section.htsp value && + + test_cmp expect .git/config +' + +test_expect_success 'Prohibited LF in comment' ' + test_must_fail git config --comment="a${LF}b" section.k v +' + test_expect_success 'non-match result' 'test_cmp expect .git/config' test_expect_success 'find mixed-case key by canonical name' ' |
