Skip to content

Commit 8b2337a

Browse files
Benabikgitster
authored andcommitted
t3902: Protect against OS X normalization
8424981: "Fix invalid read in quote_c_style_counted" introduced a test that used "caractère spécial" as a directory name. Git creates it as "caract\303\250re sp\303\251cial" OS X stores it as "caracte\314\200re spe\314\201cial" To work around this problem, use the already introduced $FN as the directory name. Signed-off-by: Brian Gernhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 105a633 commit 8b2337a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t3902-quoted.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ for_each_name () {
2525
for name in \
2626
Name "Name and a${LF}LF" "Name and an${HT}HT" "Name${DQ}" \
2727
"$FN$HT$GN" "$FN$LF$GN" "$FN $GN" "$FN$GN" "$FN$DQ$GN" \
28-
"With SP in it" "caractère spécial/file"
28+
"With SP in it" "$FN/file"
2929
do
3030
eval "$1"
3131
done
3232
}
3333

3434
test_expect_success setup '
3535
36-
mkdir "caractère spécial" &&
36+
mkdir "$FN" &&
3737
for_each_name "echo initial >\"\$name\""
3838
git add . &&
3939
git commit -q -m Initial &&
@@ -51,11 +51,11 @@ Name
5151
"Name and an\tHT"
5252
"Name\""
5353
With SP in it
54-
"caract\303\250re sp\303\251cial/file"
5554
"\346\277\261\351\207\216\t\347\264\224"
5655
"\346\277\261\351\207\216\n\347\264\224"
5756
"\346\277\261\351\207\216 \347\264\224"
5857
"\346\277\261\351\207\216\"\347\264\224"
58+
"\346\277\261\351\207\216/file"
5959
"\346\277\261\351\207\216\347\264\224"
6060
EOF
6161

@@ -65,11 +65,11 @@ Name
6565
"Name and an\tHT"
6666
"Name\""
6767
With SP in it
68-
caractère spécial/file
6968
"濱野\t純"
7069
"濱野\n純"
7170
濱野 純
7271
"濱野\"純"
72+
濱野/file
7373
濱野純
7474
EOF
7575

0 commit comments

Comments
 (0)