summaryrefslogtreecommitdiff
path: root/t/t9803-git-p4-shell-metachars.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2011-12-25 02:07:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-27 18:19:06 (GMT)
commit9e602b24fb33621a01a07eb77c117647d43e224b (patch)
tree779b9703077bd90a65405435de24a70a3b1dd1e5 /t/t9803-git-p4-shell-metachars.sh
parentd16520499d2652b5b59dfb25f9cf2d56a4c6913a (diff)
downloadgit-9e602b24fb33621a01a07eb77c117647d43e224b.zip
git-9e602b24fb33621a01a07eb77c117647d43e224b.tar.gz
git-9e602b24fb33621a01a07eb77c117647d43e224b.tar.bz2
rename git-p4 tests
Use consistent naming for all tests: "t98<num>-git-p4-<topic>.sh" Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9803-git-p4-shell-metachars.sh')
-rwxr-xr-xt/t9803-git-p4-shell-metachars.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/t/t9803-git-p4-shell-metachars.sh b/t/t9803-git-p4-shell-metachars.sh
new file mode 100755
index 0000000..db04375
--- /dev/null
+++ b/t/t9803-git-p4-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