X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=t%2Ft1300-repo-config.sh;h=78c2e0864f56ecf39e8738e8fecec9ca8dd4e8a2;hb=a2d7c6c62080b542007f9787342aa1e57b95f50c;hp=49b5666b33283feaf8ea2b7c09faeab8016c746d;hpb=3ed02de2f46105cbc45fcc8f3287513f470eb4a3;p=git.git diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 49b5666b3..78c2e0864 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,23 @@ 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" test_expect_success numbers '