aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-23 16:05:52 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-23 16:05:52 -0700
commit6aad47dec7a72bb36c64afb6c43f4dbcaa49e7f9 (patch)
tree76a8cf7b5021634fe93e0be3030cb9d4d42f682c /t
parente13067a7499f3cbf543d4a30865c70613f055b4b (diff)
parent0047dd2fd1fc1980913901c5fa098357482c2842 (diff)
downloadgit-6aad47dec7a72bb36c64afb6c43f4dbcaa49e7f9.tar.gz
git-6aad47dec7a72bb36c64afb6c43f4dbcaa49e7f9.tar.xz
Merge branch 'sp/ignorecase'
* sp/ignorecase: t0050: Fix merge test on case sensitive file systems t0050: Add test for case insensitive add t0050: Set core.ignorecase case to activate case insensitivity t0050: Test autodetect core.ignorecase git-init: autodetect core.ignorecase
Diffstat (limited to 't')
-rwxr-xr-xt/t0050-filesystem.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 3fbad7781..c5360e23d 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -7,6 +7,7 @@ test_description='Various filesystem issues'
auml=`printf '\xc3\xa4'`
aumlcdiar=`printf '\x61\xcc\x88'`
+case_insensitive=
test_expect_success 'see if we expect ' '
test_case=test_expect_success
@@ -17,6 +18,7 @@ test_expect_success 'see if we expect ' '
if test "$(cat junk/CamelCase)" != good
then
test_case=test_expect_failure
+ case_insensitive=t
say "will test on a case insensitive filesystem"
fi &&
rm -fr junk &&
@@ -32,8 +34,23 @@ test_expect_success 'see if we expect ' '
rm -fr junk
'
+if test "$case_insensitive"
+then
+test_expect_success "detection of case insensitive filesystem during repo init" '
+
+ test $(git config --bool core.ignorecase) = true
+'
+else
+test_expect_success "detection of case insensitive filesystem during repo init" '
+
+ ! git config --bool core.ignorecase >/dev/null ||
+ test $(git config --bool core.ignorecase) = false
+'
+fi
+
test_expect_success "setup case tests" '
+ git config core.ignorecase true &&
touch camelcase &&
git add camelcase &&
git commit -m "initial" &&
@@ -55,11 +72,23 @@ $test_case 'rename (case change)' '
$test_case 'merge (case change)' '
+ rm -f CamelCase &&
+ rm -f camelcase &&
git reset --hard initial &&
git merge topic
'
+$test_case 'add (with different case)' '
+
+ git reset --hard initial &&
+ rm camelcase &&
+ echo 1 >CamelCase &&
+ git add CamelCase &&
+ test $(git-ls-files | grep -i camelcase | wc -l) = 1
+
+'
+
test_expect_success "setup unicode normalization tests" '
test_create_repo unicode &&