diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-21 16:04:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-21 16:04:33 -0700 |
commit | 5a4fcc28e116f769abf94a0acc558fd37a44bcfb (patch) | |
tree | bbe9358734bbc7bf62428c9df2349457074e3ef9 /t/t9803-git-shell-metachars.sh | |
parent | abe277301996d4b30f2c8f48cf92dcf677af783d (diff) | |
parent | 6de040df566d4b4489366aa2ae5cc215ec449618 (diff) | |
download | git-5a4fcc28e116f769abf94a0acc558fd37a44bcfb.tar.gz git-5a4fcc28e116f769abf94a0acc558fd37a44bcfb.tar.xz |
Merge branch 'pw/p4-update'
* pw/p4-update:
git-p4: handle files with shell metacharacters
git-p4: keyword flattening fixes
git-p4: stop ignoring apple filetype
git-p4: recognize all p4 filetypes
git-p4: handle utf16 filetype properly
git-p4 tests: refactor and cleanup
Diffstat (limited to 't/t9803-git-shell-metachars.sh')
-rwxr-xr-x | t/t9803-git-shell-metachars.sh | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/t/t9803-git-shell-metachars.sh b/t/t9803-git-shell-metachars.sh new file mode 100755 index 000000000..db04375a1 --- /dev/null +++ b/t/t9803-git-shell-metachars.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +test_description='git-p4 transparency to shell metachars in filenames' + +. ./lib-git-p4.sh + +test_expect_success 'start p4d' ' + start_p4d +' + +test_expect_success 'init depot' ' + ( + cd "$cli" && + echo file1 >file1 && + p4 add file1 && + p4 submit -d "file1" + ) +' + +test_expect_success 'shell metachars in filenames' ' + "$GITP4" clone --dest="$git" //depot && + test_when_finished cleanup_git && + ( + cd "$git" && + git config git-p4.skipSubmitEditCheck true && + echo f1 >foo\$bar && + git add foo\$bar && + echo f2 >"file with spaces" && + git add "file with spaces" && + git commit -m "add files" && + P4EDITOR=touch "$GITP4" submit + ) && + ( + cd "$cli" && + p4 sync ... && + test -e "file with spaces" && + test -e "foo\$bar" + ) +' + +test_expect_success 'deleting with shell metachars' ' + "$GITP4" clone --dest="$git" //depot && + test_when_finished cleanup_git && + ( + cd "$git" && + git config git-p4.skipSubmitEditCheck true && + git rm foo\$bar && + git rm file\ with\ spaces && + git commit -m "remove files" && + P4EDITOR=touch "$GITP4" submit + ) && + ( + cd "$cli" && + p4 sync ... && + test ! -e "file with spaces" && + test ! -e foo\$bar + ) +' + +test_expect_success 'kill p4d' ' + kill_p4d +' + +test_done |