File tree Expand file tree Collapse file tree 5 files changed +26
-25
lines changed
Expand file tree Collapse file tree 5 files changed +26
-25
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,13 @@ test_expect_success \
1414 git add -- foo bar baz 'space embedded' -q &&
1515 git commit -m 'add normal files'"
1616
17- if test_have_prereq ! MINGW && touch -- ' tab embedded' ' newline
18- embedded' 2> /dev/null
19- then
20- test_set_prereq FUNNYNAMES
21- else
17+ if test_have_prereq ! FUNNYNAMES; then
2218 say ' Your filesystem does not allow tabs in filenames.'
2319fi
2420
2521test_expect_success FUNNYNAMES ' add files with funny names' "
22+ touch -- 'tab embedded' 'newline
23+ embedded' &&
2624 git add -- 'tab embedded' 'newline
2725embedded' &&
2826 git commit -m 'add files with tabs and newlines'
Original file line number Diff line number Diff line change @@ -15,15 +15,7 @@ test_expect_success 'setup' '
1515 git checkout -f preimage^0 &&
1616 git read-tree -u --reset HEAD &&
1717 git update-index --refresh
18- } &&
19-
20- test_when_finished "rm -f \"tab embedded.txt\"" &&
21- test_when_finished "rm -f ' \' ' \"quoteembedded\".txt' \' ' " &&
22- if test_have_prereq !MINGW &&
23- touch -- "tab embedded.txt" ' \' ' "quoteembedded".txt' \' '
24- then
25- test_set_prereq FUNNYNAMES
26- fi
18+ }
2719'
2820
2921try_filename () {
Original file line number Diff line number Diff line change @@ -1278,7 +1278,7 @@ test_expect_success 'setup for path completion tests' '
12781278 touch BS\\dir/DQ\"file \
12791279 ' $' separators\034 in\035 dir/sep\036 in\037 file' '
12801280 then
1281- test_set_prereq FUNNYNAMES
1281+ test_set_prereq FUNNIERNAMES
12821282 else
12831283 rm -rf BS\\dir ' $' separators\034 in\035 dir' '
12841284 fi
@@ -1320,7 +1320,7 @@ test_expect_success '__git_complete_index_file - UTF-8 in ls-files output' '
13201320 test_path_completion árvíztűrő/С "árvíztűrő/Сайн яваарай"
13211321'
13221322
1323- test_expect_success FUNNYNAMES \
1323+ test_expect_success FUNNIERNAMES \
13241324 ' __git_complete_index_file - C-style escapes in ls-files output' '
13251325 test_path_completion BS \
13261326 BS\\dir &&
@@ -1332,7 +1332,7 @@ test_expect_success FUNNYNAMES \
13321332 BS\\dir/DQ\"file
13331333'
13341334
1335- test_expect_success FUNNYNAMES \
1335+ test_expect_success FUNNIERNAMES \
13361336 ' __git_complete_index_file - \nnn-escaped characters in ls-files output' '
13371337 test_path_completion sep ' $' separators\034 in\035 dir' ' &&
13381338 test_path_completion ' $' separators\034 i' ' \
Original file line number Diff line number Diff line change @@ -63,18 +63,15 @@ test_expect_success 'prompt - unborn branch' '
6363 test_cmp expected "$actual"
6464'
6565
66- repo_with_newline=' repo
67- with
68- newline'
69-
70- if test_have_prereq ! MINGW && mkdir " $repo_with_newline " 2> /dev/null
71- then
72- test_set_prereq FUNNYNAMES
73- else
66+ if test_have_prereq ! FUNNYNAMES; then
7467 say ' Your filesystem does not allow newlines in filenames.'
7568fi
7669
7770test_expect_success FUNNYNAMES ' prompt - with newline in path' '
71+ repo_with_newline="repo
72+ with
73+ newline" &&
74+ mkdir "$repo_with_newline" &&
7875 printf " (master)" >expected &&
7976 git init "$repo_with_newline" &&
8077 test_when_finished "rm -rf \"$repo_with_newline\"" &&
Original file line number Diff line number Diff line change @@ -1104,6 +1104,20 @@ test_lazy_prereq CASE_INSENSITIVE_FS '
11041104 test "$(cat CamelCase)" != good
11051105'
11061106
1107+ test_lazy_prereq FUNNYNAMES '
1108+ test_have_prereq !MINGW &&
1109+ touch -- \
1110+ "FUNNYNAMES tab embedded" \
1111+ "FUNNYNAMES \"quote embedded\"" \
1112+ "FUNNYNAMES newline
1113+ embedded" 2>/dev/null &&
1114+ rm -- \
1115+ "FUNNYNAMES tab embedded" \
1116+ "FUNNYNAMES \"quote embedded\"" \
1117+ "FUNNYNAMES newline
1118+ embedded" 2>/dev/null
1119+ '
1120+
11071121test_lazy_prereq UTF8_NFD_TO_NFC '
11081122 # check whether FS converts nfd unicode to nfc
11091123 auml=$(printf "\303\244")
You can’t perform that action at this time.
0 commit comments