Skip to content

Commit a8d8e38

Browse files
Pete Wyckoffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1616898 commit a8d8e38

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

t/t9802-git-p4-filetype.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,23 @@ test_expect_success 'ignore apple' '
250250
)
251251
'
252252

253+
test_expect_success SYMLINKS 'create p4 symlink' '
254+
cd "$cli" &&
255+
ln -s symlink-target symlink &&
256+
p4 add symlink &&
257+
p4 submit -d "add symlink"
258+
'
259+
260+
test_expect_success SYMLINKS 'ensure p4 symlink parsed correctly' '
261+
test_when_finished cleanup_git &&
262+
git p4 clone --dest="$git" //depot@all &&
263+
(
264+
cd "$git" &&
265+
test -L symlink &&
266+
test $(readlink symlink) = symlink-target
267+
)
268+
'
269+
253270
test_expect_success 'kill p4d' '
254271
kill_p4d
255272
'

0 commit comments

Comments
 (0)