t7400: test of UTF-8 submodule names pass under Mac OS
submodules with names using UTF-8 need core.precomposeunicode true under Mac OS X, set it in the test case. Improve the portability: - Not all shells on all OS may understand literal UTF-8 strings. - Use a help variable filled by printf, as we do it in e.g. t0050. "strange names" can be called UTF-8, rephrase the heading. While at it, unbreak &&-chain in the test, and use test_config. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
74671241fd
commit
bed9470489
@ -868,16 +868,19 @@ test_expect_success 'submodule deinit fails when submodule has a .git directory
|
|||||||
test -n "$(git config --get-regexp "submodule\.example\.")"
|
test -n "$(git config --get-regexp "submodule\.example\.")"
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'submodule with strange name works "å äö"' '
|
test_expect_success 'submodule with UTF-8 name' '
|
||||||
mkdir "å äö" &&
|
svname=$(printf "\303\245 \303\244\303\266") &&
|
||||||
|
mkdir "$svname" &&
|
||||||
(
|
(
|
||||||
cd "å äö" &&
|
cd "$svname" &&
|
||||||
git init &&
|
git init &&
|
||||||
touch sub
|
>sub &&
|
||||||
git add sub
|
git add sub &&
|
||||||
git commit -m "init sub"
|
git commit -m "init sub"
|
||||||
)
|
) &&
|
||||||
git submodule add "/å äö" &&
|
test_config core.precomposeunicode true &&
|
||||||
test -n "$(git submodule | grep "å äö")"
|
git submodule add ./"$svname" &&
|
||||||
|
git submodule >&2 &&
|
||||||
|
test -n "$(git submodule | grep "$svname")"
|
||||||
'
|
'
|
||||||
test_done
|
test_done
|
||||||
|
Reference in New Issue
Block a user