git-bisect.sh: don't accidentally override existing branch "bisect"
[git/gitweb-caching.git] / t / t1303-wacky-config.sh
blob99985dcd79f12d680c51e8f64d61c47a70b43f36
1 #!/bin/sh
3 test_description='Test wacky input to git config'
4 . ./test-lib.sh
6 setup() {
7 (printf "[section]\n" &&
8 printf " key = foo") >.git/config
11 check() {
12 echo "$2" >expected
13 git config --get "$1" >actual
14 git diff actual expected
17 test_expect_success 'modify same key' '
18 setup &&
19 git config section.key bar &&
20 check section.key bar
23 test_expect_success 'add key in same section' '
24 setup &&
25 git config section.other bar &&
26 check section.key foo &&
27 check section.other bar
30 test_expect_success 'add key in different section' '
31 setup &&
32 git config section2.key bar &&
33 check section.key foo &&
34 check section2.key bar
37 test_done