diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-01-27 10:45:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-27 10:45:41 -0800 |
commit | 523f0a25b91c34ec817bc5757f52f365f497e3bb (patch) | |
tree | 09d5b98d64030b0e7f97c2e5536b466adcfa4c32 /t/t9812-git-p4-wildcards.sh | |
parent | Merge branch 'ss/safe-create-leading-dir-with-slash' (diff) | |
parent | git p4 doc: use two-line style for options with multiple spellings (diff) | |
download | tgif-523f0a25b91c34ec817bc5757f52f365f497e3bb.tar.xz |
Merge branch 'pw/git-p4'
Various "git p4" updates.
* pw/git-p4:
git p4 doc: use two-line style for options with multiple spellings
git p4 test: examine behavior with locked (+l) files
git p4: fix an error message when "p4 where" fails
git p4: handle files with wildcards when doing RCS scrubbing
git p4 test: do not pollute /tmp
git p4 test: run as user "author"
git p4 test: is_cli_file_writeable succeeds
git p4 test: explicitly check p4 wildcard delete
git p4: work around p4 bug that causes empty symlinks
git p4 test: ensure p4 symlink parsing works
git p4 test: wildcards are supported
Diffstat (limited to 't/t9812-git-p4-wildcards.sh')
-rwxr-xr-x | t/t9812-git-p4-wildcards.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/t/t9812-git-p4-wildcards.sh b/t/t9812-git-p4-wildcards.sh index 67633257f3..c7472cbf54 100755 --- a/t/t9812-git-p4-wildcards.sh +++ b/t/t9812-git-p4-wildcards.sh @@ -161,6 +161,56 @@ 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 'wildcard files requiring keyword scrub' ' + ( + cd "$cli" && + cat <<-\EOF >scrub@wild && + $Id$ + line2 + EOF + p4 add -t text+k -f scrub@wild && + p4 submit -d "scrub at wild" + ) && + test_when_finished cleanup_git && + git p4 clone --dest="$git" //depot && + ( + cd "$git" && + git config git-p4.skipSubmitEdit true && + git config git-p4.attemptRCSCleanup true && + sed "s/^line2/line2 edit/" <scrub@wild >scrub@wild.tmp && + mv -f scrub@wild.tmp scrub@wild && + git commit -m "scrub at wild line2 edit" scrub@wild && + git p4 submit + ) +' + test_expect_success 'kill p4d' ' kill_p4d ' |