git p4 test: explicitly check p4 wildcard delete
There was no test where p4 deleted a file with a wildcard character. Make sure git p4 applies the wildcard decoding properly when importing a delete that includes a wildcard. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Jan 21, 2014 at 18:16 UTC
630c4f19f0d4f4c6a485af944d88665979fa0e1f
1 file changed
+27
t/t9812-git-p4-wildcards.sh
+27
@@ -161,6 +161,33 @@ test_expect_success 'wildcard files submit back to p4, delete' '
161
)
162
'
163
164
+test_expect_success 'p4 deleted a wildcard file' '
165
+ (
166
+ cd "$cli" &&
167
+ echo "wild delete test" >wild@delete &&
168
+ p4 add -f wild@delete &&
169
+ p4 submit -d "add wild@delete"
170
+ ) &&
171
+ test_when_finished cleanup_git &&
172
+ git p4 clone --dest="$git" //depot &&
173
+ (
174
+ cd "$git" &&
175
+ test_path_is_file wild@delete
176
+ ) &&
177
+ (
178
+ cd "$cli" &&
179
+ # must use its encoded name
180
+ p4 delete wild%40delete &&
181
+ p4 submit -d "delete wild@delete"
182
+ ) &&
183
+ (
184
+ cd "$git" &&
185
+ git p4 sync &&
186
+ git merge --ff-only p4/master &&
187
+ test_path_is_missing wild@delete
188
+ )
189
+'
190
+
191
test_expect_success 'kill p4d' '
192
kill_p4d
193
'