diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-29 22:38:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-29 22:38:14 +0300 |
commit | dc55e3e3c2be99ba1b26ba8ee5df428afde57e1b (patch) | |
tree | 3418bf83b6f7426eb2293fe8c9f07ce474fb94e6 /t/test-lib-functions.sh | |
parent | 63d9fa23cf4daa71528a35b3bcbcb407ade4219d (diff) | |
parent | ed33bd8f305fd62c87059aa227b99d2411e8eabc (diff) |
Merge branch 'js/t0001-case-insensitive' into maint
Test update.
* js/t0001-case-insensitive:
t0001: fix on case-insensitive filesystems
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 8270de74be..f233522f43 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -888,6 +888,21 @@ test_cmp_rev () { fi } +# Compare paths respecting core.ignoreCase +test_cmp_fspath () { + if test "x$1" = "x$2" + then + return 0 + fi + + if test true != "$(git config --get --type=bool core.ignorecase)" + then + return 1 + fi + + test "x$(echo "$1" | tr A-Z a-z)" = "x$(echo "$2" | tr A-Z a-z)" +} + # Print a sequence of integers in increasing order, either with # two arguments (start and end): # |