t0050: Test autodetect core.ignorecase
Verify if core.ignorecase is automatically set to 'true' during repository initialization if the file system is case insensitive, and unset or 'false' otherwise. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Steffen Prohaska committed
May 11, 2008 at 18:16 UTC
1c51c7d7d97acb447050a820dc39d242dc29c5df
1 file changed
+16
t/t0050-filesystem.sh
+16
@@ -7,6 +7,7 @@ test_description='Various filesystem issues'
7
auml=`printf '\xc3\xa4'`
8
aumlcdiar=`printf '\x61\xcc\x88'`
9
10
+case_insensitive=
11
test_expect_success 'see if we expect ' '
12
13
test_case=test_expect_success
@@ -17,6 +18,7 @@ test_expect_success 'see if we expect ' '
18
if test "$(cat junk/CamelCase)" != good
19
then
20
test_case=test_expect_failure
21
+ case_insensitive=t
22
say "will test on a case insensitive filesystem"
23
fi &&
24
rm -fr junk &&
@@ -32,6 +34,20 @@ test_expect_success 'see if we expect ' '
34
rm -fr junk
35
'
36
37
+if test "$case_insensitive"
38
+then
39
+test_expect_success "detection of case insensitive filesystem during repo init" '
40
+
41
+ test $(git config --bool core.ignorecase) = true
42
+'
43
+else
44
+test_expect_success "detection of case insensitive filesystem during repo init" '
45
+
46
+ ! git config --bool core.ignorecase >/dev/null ||
47
+ test $(git config --bool core.ignorecase) = false
48
+'
49
+fi
50
+
51
test_expect_success "setup case tests" '
52
53
touch camelcase &&