t3300: funny name test
Add double quote character to the test pattern. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Dec 10, 2005 at 18:36 UTC
73ab46d6d03fc38e7b57f7fb731da432d4433268
1 file changed
+14
-14
t/t3300-funny-names.sh
+14
-14
@@ -15,7 +15,7 @@ test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
15
. ./test-lib.sh
16
17
p0='no-funny'
18
-p1='tabs and spaces'
18
+p1='tabs ," (dq) and spaces'
19
p2='just space'
20
21
cat >"$p0" <<\EOF
@@ -39,7 +39,7 @@ echo "$t0" >t0
39
40
echo 'just space
41
no-funny
42
-"tabs\tand spaces"' >expected
42
+"tabs\t,\" (dq) and spaces"' >expected
43
test_expect_success 'git-ls-files with-funny' \
44
'git-update-index --add "$p1" &&
45
git-ls-files >current &&
@@ -47,7 +47,7 @@ test_expect_success 'git-ls-files with-funny' \
47
48
echo 'just space
49
no-funny
50
-tabs and spaces' >expected
50
+tabs ," (dq) and spaces' >expected
51
test_expect_success 'git-ls-files -z with-funny' \
52
'git-ls-files -z | tr \\0 \\012 >current &&
53
diff -u expected current'
@@ -57,12 +57,12 @@ echo "$t1" >t1
57
58
echo 'just space
59
no-funny
60
-"tabs\tand spaces"' >expected
60
+"tabs\t,\" (dq) and spaces"' >expected
61
test_expect_success 'git-ls-tree with funny' \
62
'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
63
diff -u expected current'
64
65
-echo 'A "tabs\tand spaces"' >expected
65
+echo 'A "tabs\t,\" (dq) and spaces"' >expected
66
test_expect_success 'git-diff-index with-funny' \
67
'git-diff-index --name-status $t0 >current &&
68
diff -u expected current'
@@ -72,7 +72,7 @@ test_expect_success 'git-diff-tree with-funny' \
72
diff -u expected current'
73
74
echo 'A
75
-tabs and spaces' >expected
75
+tabs ," (dq) and spaces' >expected
76
test_expect_success 'git-diff-index -z with-funny' \
77
'git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
78
diff -u expected current'
@@ -81,23 +81,23 @@ test_expect_success 'git-diff-tree -z with-funny' \
81
'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
82
diff -u expected current'
83
84
-echo 'CNUM no-funny "tabs\tand spaces"' >expected
84
+echo 'CNUM no-funny "tabs\t,\" (dq) and spaces"' >expected
85
test_expect_success 'git-diff-tree -C with-funny' \
86
'git-diff-tree -C --find-copies-harder --name-status \
87
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
88
diff -u expected current'
89
90
-echo 'RNUM no-funny "tabs\tand spaces"' >expected
90
+echo 'RNUM no-funny "tabs\t,\" (dq) and spaces"' >expected
91
test_expect_success 'git-diff-tree delete with-funny' \
92
'git-update-index --force-remove "$p0" &&
93
git-diff-index -M --name-status \
94
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
95
diff -u expected current'
96
97
-echo 'diff --git a/no-funny "b/tabs\tand spaces"
97
+echo 'diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
98
similarity index NUM%
99
rename from no-funny
100
-rename to "tabs\tand spaces"' >expected
100
+rename to "tabs\t,\" (dq) and spaces"' >expected
101
102
test_expect_success 'git-diff-tree delete with-funny' \
103
'git-diff-index -M -p $t0 |
@@ -105,19 +105,19 @@ test_expect_success 'git-diff-tree delete with-funny' \
105
diff -u expected current'
106
107
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"
109
old mode 100644
110
new mode 100755
111
similarity index NUM%
112
rename from no-funny
113
-rename to "tabs\tand spaces"' >expected
113
+rename to "tabs\t,\" (dq) and spaces"' >expected
114
115
test_expect_success 'git-diff-tree delete with-funny' \
116
'git-diff-index -M -p $t0 |
117
sed -e "s/index [0-9]*%/index NUM%/" >current &&
118
diff -u expected current'
119
120
-echo >expected ' "tabs\tand spaces"
120
+echo >expected ' "tabs\t,\" (dq) and spaces"
121
1 files changed, 0 insertions(+), 0 deletions(-)'
122
test_expect_success 'git-diff-tree rename with-funny applied' \
123
'git-diff-index -M -p $t0 |
@@ -125,7 +125,7 @@ test_expect_success 'git-diff-tree rename with-funny applied' \
125
diff -u expected current'
126
127
echo >expected ' no-funny
128
- "tabs\tand spaces"
128
+ "tabs\t,\" (dq) and spaces"
129
2 files changed, 3 insertions(+), 3 deletions(-)'
130
131
test_expect_success 'git-diff-tree delete with-funny applied' \