X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft1300-repo-config.sh;h=a1d777ca81456fb737b9f02effe7ff02c53645ad;hb=e986e26a86616054f96373280e8f9cc89d7ea8ca;hp=49b5666b33283feaf8ea2b7c09faeab8016c746d;hpb=ea44949605781d1947ba1422ee541867e7ce9b81;p=git.git diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 49b5666b3..a1d777ca8 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -368,12 +368,12 @@ cat > expect << EOF weird EOF -test_expect_success "rename succeeded" "diff -u expect .git/config" +test_expect_success "rename succeeded" "git diff expect .git/config" test_expect_failure "rename non-existing section" \ 'git-config --rename-section branch."world domination" branch.drei' -test_expect_success "rename succeeded" "diff -u expect .git/config" +test_expect_success "rename succeeded" "git diff expect .git/config" test_expect_success "rename another section" \ 'git-config --rename-section branch."1 234 blabl/a" branch.drei' @@ -389,7 +389,42 @@ cat > expect << EOF weird EOF -test_expect_success "rename succeeded" "diff -u expect .git/config" +test_expect_success "rename succeeded" "git diff expect .git/config" + +cat >> .git/config << EOF + [branch "zwei"] a = 1 [branch "vier"] +EOF + +test_expect_success "remove section" "git config --remove-section branch.zwei" + +cat > expect << EOF +# Hallo + #Bello +[branch "drei"] +weird +EOF + +test_expect_success "section was removed properly" \ + "git diff -u expect .git/config" + +rm .git/config + +cat > expect << EOF +[gitcvs] + enabled = true + dbname = %Ggitcvs2.%a.%m.sqlite +[gitcvs "ext"] + dbname = %Ggitcvs1.%a.%m.sqlite +EOF + +test_expect_success 'section ending' ' + + git-config gitcvs.enabled true && + git-config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite && + git-config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite && + cmp .git/config expect + +' test_expect_success numbers '