aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2014-01-21 18:16:39 -0500
committerJunio C Hamano <gitster@pobox.com>2014-01-21 15:50:27 -0800
commita8d8e382a95b8412b105ca12fcdad2dff521827f (patch)
treeb87e24ea3e3019e88570e08f3f13c8f62e5f37b9
parent16168986eb5924f21e52de61cf5703b840872c91 (diff)
downloadgit-a8d8e382a95b8412b105ca12fcdad2dff521827f.tar.gz
git-a8d8e382a95b8412b105ca12fcdad2dff521827f.tar.xz
git p4 test: ensure p4 symlink parsing works
While this happens to work, there was no test to make sure that the basic importing of a symlink from p4 to git functioned. Add a simple test to create a symlink in p4 and import it into git, then verify that the symlink exists and has the correct target. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t9802-git-p4-filetype.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh
index a82744bab..94d7be961 100755
--- a/t/t9802-git-p4-filetype.sh
+++ b/t/t9802-git-p4-filetype.sh
@@ -250,6 +250,23 @@ test_expect_success 'ignore apple' '
)
'
+test_expect_success SYMLINKS 'create p4 symlink' '
+ cd "$cli" &&
+ ln -s symlink-target symlink &&
+ p4 add symlink &&
+ p4 submit -d "add symlink"
+'
+
+test_expect_success SYMLINKS 'ensure p4 symlink parsed correctly' '
+ test_when_finished cleanup_git &&
+ git p4 clone --dest="$git" //depot@all &&
+ (
+ cd "$git" &&
+ test -L symlink &&
+ test $(readlink symlink) = symlink-target
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'