Skip to content

Commit

Permalink
Merge branch 'jk/config-test-cleanup'
Browse files Browse the repository at this point in the history
* jk/config-test-cleanup:
  t1300: attempting to remove a non-existent .git/config is not an error
  • Loading branch information
Junio C Hamano committed Oct 19, 2011
2 parents aadf863 + 795290e commit e283548
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions t/t1300-repo-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,6 @@ EOF
test_expect_success "section was removed properly" \
"test_cmp expect .git/config"

rm .git/config

cat > expect << EOF
[gitcvs]
enabled = true
Expand All @@ -570,6 +568,7 @@ EOF

test_expect_success 'section ending' '
rm -f .git/config &&
git config gitcvs.enabled true &&
git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
Expand Down Expand Up @@ -642,8 +641,6 @@ test_expect_success 'invalid bool (set)' '
test_must_fail git config --bool bool.nobool foobar'

rm .git/config

cat > expect <<\EOF
[bool]
true1 = true
Expand All @@ -658,6 +655,7 @@ EOF

test_expect_success 'set --bool' '
rm -f .git/config &&
git config --bool bool.true1 01 &&
git config --bool bool.true2 -1 &&
git config --bool bool.true3 YeS &&
Expand All @@ -668,8 +666,6 @@ test_expect_success 'set --bool' '
git config --bool bool.false4 FALSE &&
cmp expect .git/config'

rm .git/config

cat > expect <<\EOF
[int]
val1 = 1
Expand All @@ -679,13 +675,12 @@ EOF

test_expect_success 'set --int' '
rm -f .git/config &&
git config --int int.val1 01 &&
git config --int int.val2 -1 &&
git config --int int.val3 5m &&
cmp expect .git/config'

rm .git/config

cat >expect <<\EOF
[bool]
true1 = true
Expand All @@ -699,6 +694,7 @@ cat >expect <<\EOF
EOF

test_expect_success 'get --bool-or-int' '
rm -f .git/config &&
(
echo "[bool]"
echo true1
Expand All @@ -718,7 +714,6 @@ test_expect_success 'get --bool-or-int' '
'

rm .git/config
cat >expect <<\EOF
[bool]
true1 = true
Expand All @@ -732,6 +727,7 @@ cat >expect <<\EOF
EOF

test_expect_success 'set --bool-or-int' '
rm -f .git/config &&
git config --bool-or-int bool.true1 true &&
git config --bool-or-int bool.false1 false &&
git config --bool-or-int bool.true2 yes &&
Expand All @@ -742,8 +738,6 @@ test_expect_success 'set --bool-or-int' '
test_cmp expect .git/config
'

rm .git/config

cat >expect <<\EOF
[path]
home = ~/
Expand All @@ -752,6 +746,7 @@ cat >expect <<\EOF
EOF

test_expect_success NOT_MINGW 'set --path' '
rm -f .git/config &&
git config --path path.home "~/" &&
git config --path path.normal "/dev/null" &&
git config --path path.trailingtilde "foo~" &&
Expand Down Expand Up @@ -800,7 +795,7 @@ cat > expect << EOF
hash = "test#test"
EOF
test_expect_success 'quoting' '
rm .git/config &&
rm -f .git/config &&
git config quote.leading " test" &&
git config quote.ending "test " &&
git config quote.semicolon "test;test" &&
Expand Down

0 comments on commit e283548

Please sign in to comment.