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 \
14
14
git add -- foo bar baz 'space embedded' -q &&
15
15
git commit -m 'add normal files'"
16
16
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
22
18
say ' Your filesystem does not allow tabs in filenames.'
23
19
fi
24
20
25
21
test_expect_success FUNNYNAMES ' add files with funny names' "
22
+ touch -- 'tab embedded' 'newline
23
+ embedded' &&
26
24
git add -- 'tab embedded' 'newline
27
25
embedded' &&
28
26
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' '
15
15
git checkout -f preimage^0 &&
16
16
git read-tree -u --reset HEAD &&
17
17
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
+ }
27
19
'
28
20
29
21
try_filename () {
Original file line number Diff line number Diff line change @@ -1278,7 +1278,7 @@ test_expect_success 'setup for path completion tests' '
1278
1278
touch BS\\dir/DQ\"file \
1279
1279
' $' separators\034 in\035 dir/sep\036 in\037 file' '
1280
1280
then
1281
- test_set_prereq FUNNYNAMES
1281
+ test_set_prereq FUNNIERNAMES
1282
1282
else
1283
1283
rm -rf BS\\dir ' $' separators\034 in\035 dir' '
1284
1284
fi
@@ -1320,7 +1320,7 @@ test_expect_success '__git_complete_index_file - UTF-8 in ls-files output' '
1320
1320
test_path_completion árvíztűrő/С "árvíztűrő/Сайн яваарай"
1321
1321
'
1322
1322
1323
- test_expect_success FUNNYNAMES \
1323
+ test_expect_success FUNNIERNAMES \
1324
1324
' __git_complete_index_file - C-style escapes in ls-files output' '
1325
1325
test_path_completion BS \
1326
1326
BS\\dir &&
@@ -1332,7 +1332,7 @@ test_expect_success FUNNYNAMES \
1332
1332
BS\\dir/DQ\"file
1333
1333
'
1334
1334
1335
- test_expect_success FUNNYNAMES \
1335
+ test_expect_success FUNNIERNAMES \
1336
1336
' __git_complete_index_file - \nnn-escaped characters in ls-files output' '
1337
1337
test_path_completion sep ' $' separators\034 in\035 dir' ' &&
1338
1338
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' '
63
63
test_cmp expected "$actual"
64
64
'
65
65
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
74
67
say ' Your filesystem does not allow newlines in filenames.'
75
68
fi
76
69
77
70
test_expect_success FUNNYNAMES ' prompt - with newline in path' '
71
+ repo_with_newline="repo
72
+ with
73
+ newline" &&
74
+ mkdir "$repo_with_newline" &&
78
75
printf " (master)" >expected &&
79
76
git init "$repo_with_newline" &&
80
77
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 '
1104
1104
test "$(cat CamelCase)" != good
1105
1105
'
1106
1106
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
+
1107
1121
test_lazy_prereq UTF8_NFD_TO_NFC '
1108
1122
# check whether FS converts nfd unicode to nfc
1109
1123
auml=$(printf "\303\244")
You can’t perform that action at this time.
0 commit comments