The fourth batch
[alt-git.git] / t / t9830-git-p4-symlink-dir.sh
blob02561a7f0e62f7919ac897d733c4edd3c7e9b695
1 #!/bin/sh
3 test_description='git p4 symlinked directories'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./lib-git-p4.sh
8 test_expect_success 'start p4d' '
9 start_p4d
12 test_expect_success 'symlinked directory' '
14 cd "$cli" &&
15 : >first_file.t &&
16 p4 add first_file.t &&
17 p4 submit -d "first change"
18 ) &&
19 git p4 clone --dest "$git" //depot &&
21 cd "$git" &&
22 mkdir -p some/sub/directory &&
23 mkdir -p other/subdir2 &&
24 : > other/subdir2/file.t &&
25 (cd some/sub/directory && ln -s ../../../other/subdir2 .) &&
26 git add some other &&
27 git commit -m "symlinks" &&
28 git config git-p4.skipSubmitEdit true &&
29 git p4 submit -v
30 ) &&
32 cd "$cli" &&
33 p4 sync &&
34 test -L some/sub/directory/subdir2 &&
35 test_path_is_file some/sub/directory/subdir2/file.t
40 test_done