aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2011-12-24 21:07:38 -0500
committerJunio C Hamano <gitster@pobox.com>2011-12-27 10:19:31 -0800
commitae3f41f20a0b5a9fa3e83a12557c887855b920f3 (patch)
tree2cbbdafd114969f3505bb27f8cb58a1c4c50a566 /t
parent7fbe1ce9e2050f1d3f64868abcbc0d0794af3d13 (diff)
downloadgit-ae3f41f20a0b5a9fa3e83a12557c887855b920f3.tar.gz
git-ae3f41f20a0b5a9fa3e83a12557c887855b920f3.tar.xz
git-p4: test --keep-path
Make sure it leaves the path, below //depot, in git. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9806-git-p4-options.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh
index cc0fd26d3..6b288acbd 100755
--- a/t/t9806-git-p4-options.sh
+++ b/t/t9806-git-p4-options.sh
@@ -93,6 +93,30 @@ test_expect_success 'clone --max-changes' '
)
'
+test_expect_success 'clone --keep-path' '
+ (
+ cd "$cli" &&
+ mkdir -p sub/dir &&
+ echo f4 >sub/dir/f4 &&
+ p4 add sub/dir/f4 &&
+ p4 submit -d "change 4"
+ ) &&
+ "$GITP4" clone --dest="$git" --keep-path //depot/sub/dir@all &&
+ test_when_finished cleanup_git &&
+ (
+ cd "$git" &&
+ test_path_is_missing f4 &&
+ test_path_is_file sub/dir/f4
+ ) &&
+ cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot/sub/dir@all &&
+ (
+ cd "$git" &&
+ test_path_is_file f4 &&
+ test_path_is_missing sub/dir/f4
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'