Skip to content

Commit 73ab46d

Browse files
author
Junio C Hamano
committed
t3300: funny name test
Add double quote character to the test pattern. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 024510c commit 73ab46d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

t/t3300-funny-names.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
1515
. ./test-lib.sh
1616

1717
p0='no-funny'
18-
p1='tabs and spaces'
18+
p1='tabs ," (dq) and spaces'
1919
p2='just space'
2020

2121
cat >"$p0" <<\EOF
@@ -39,15 +39,15 @@ echo "$t0" >t0
3939

4040
echo 'just space
4141
no-funny
42-
"tabs\tand spaces"' >expected
42+
"tabs\t,\" (dq) and spaces"' >expected
4343
test_expect_success 'git-ls-files with-funny' \
4444
'git-update-index --add "$p1" &&
4545
git-ls-files >current &&
4646
diff -u expected current'
4747

4848
echo 'just space
4949
no-funny
50-
tabs and spaces' >expected
50+
tabs ," (dq) and spaces' >expected
5151
test_expect_success 'git-ls-files -z with-funny' \
5252
'git-ls-files -z | tr \\0 \\012 >current &&
5353
diff -u expected current'
@@ -57,12 +57,12 @@ echo "$t1" >t1
5757

5858
echo 'just space
5959
no-funny
60-
"tabs\tand spaces"' >expected
60+
"tabs\t,\" (dq) and spaces"' >expected
6161
test_expect_success 'git-ls-tree with funny' \
6262
'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
6363
diff -u expected current'
6464

65-
echo 'A "tabs\tand spaces"' >expected
65+
echo 'A "tabs\t,\" (dq) and spaces"' >expected
6666
test_expect_success 'git-diff-index with-funny' \
6767
'git-diff-index --name-status $t0 >current &&
6868
diff -u expected current'
@@ -72,7 +72,7 @@ test_expect_success 'git-diff-tree with-funny' \
7272
diff -u expected current'
7373

7474
echo 'A
75-
tabs and spaces' >expected
75+
tabs ," (dq) and spaces' >expected
7676
test_expect_success 'git-diff-index -z with-funny' \
7777
'git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
7878
diff -u expected current'
@@ -81,51 +81,51 @@ test_expect_success 'git-diff-tree -z with-funny' \
8181
'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
8282
diff -u expected current'
8383

84-
echo 'CNUM no-funny "tabs\tand spaces"' >expected
84+
echo 'CNUM no-funny "tabs\t,\" (dq) and spaces"' >expected
8585
test_expect_success 'git-diff-tree -C with-funny' \
8686
'git-diff-tree -C --find-copies-harder --name-status \
8787
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
8888
diff -u expected current'
8989

90-
echo 'RNUM no-funny "tabs\tand spaces"' >expected
90+
echo 'RNUM no-funny "tabs\t,\" (dq) and spaces"' >expected
9191
test_expect_success 'git-diff-tree delete with-funny' \
9292
'git-update-index --force-remove "$p0" &&
9393
git-diff-index -M --name-status \
9494
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
9595
diff -u expected current'
9696

97-
echo 'diff --git a/no-funny "b/tabs\tand spaces"
97+
echo 'diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
9898
similarity index NUM%
9999
rename from no-funny
100-
rename to "tabs\tand spaces"' >expected
100+
rename to "tabs\t,\" (dq) and spaces"' >expected
101101

102102
test_expect_success 'git-diff-tree delete with-funny' \
103103
'git-diff-index -M -p $t0 |
104104
sed -e "s/index [0-9]*%/index NUM%/" >current &&
105105
diff -u expected current'
106106

107107
chmod +x "$p1"
108-
echo 'diff --git a/no-funny "b/tabs\tand spaces"
108+
echo 'diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
109109
old mode 100644
110110
new mode 100755
111111
similarity index NUM%
112112
rename from no-funny
113-
rename to "tabs\tand spaces"' >expected
113+
rename to "tabs\t,\" (dq) and spaces"' >expected
114114

115115
test_expect_success 'git-diff-tree delete with-funny' \
116116
'git-diff-index -M -p $t0 |
117117
sed -e "s/index [0-9]*%/index NUM%/" >current &&
118118
diff -u expected current'
119119

120-
echo >expected ' "tabs\tand spaces"
120+
echo >expected ' "tabs\t,\" (dq) and spaces"
121121
1 files changed, 0 insertions(+), 0 deletions(-)'
122122
test_expect_success 'git-diff-tree rename with-funny applied' \
123123
'git-diff-index -M -p $t0 |
124124
git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
125125
diff -u expected current'
126126

127127
echo >expected ' no-funny
128-
"tabs\tand spaces"
128+
"tabs\t,\" (dq) and spaces"
129129
2 files changed, 3 insertions(+), 3 deletions(-)'
130130

131131
test_expect_success 'git-diff-tree delete with-funny applied' \

0 commit comments

Comments
 (0)