Skip to content

Commit

Permalink
git p4 test: explicitly check p4 wildcard delete
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Jan 22, 2014
1 parent 40f846c commit 630c4f1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions t/t9812-git-p4-wildcards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,33 @@ test_expect_success 'wildcard files submit back to p4, delete' '
)
'

test_expect_success 'p4 deleted a wildcard file' '
(
cd "$cli" &&
echo "wild delete test" >wild@delete &&
p4 add -f wild@delete &&
p4 submit -d "add wild@delete"
) &&
test_when_finished cleanup_git &&
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
test_path_is_file wild@delete
) &&
(
cd "$cli" &&
# must use its encoded name
p4 delete wild%40delete &&
p4 submit -d "delete wild@delete"
) &&
(
cd "$git" &&
git p4 sync &&
git merge --ff-only p4/master &&
test_path_is_missing wild@delete
)
'

test_expect_success 'kill p4d' '
kill_p4d
'
Expand Down

0 comments on commit 630c4f1

Please sign in to comment.