3 test_description='Clone repositories with non ASCII paths'
7 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
8 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
10 test_expect_success 'start p4d' '
14 test_expect_success 'Create a repo containing iso8859-1 encoded paths' '
17 ISO8859="$(printf "$ISO8859_ESCAPED")" &&
18 echo content123 >"$ISO8859" &&
20 p4 submit -d "test commit"
24 test_expect_failure 'Clone auto-detects depot with iso8859-1 paths' '
25 git p4 clone --destination="$git" //depot &&
26 test_when_finished cleanup_git &&
29 UTF8="$(printf "$UTF8_ESCAPED")" &&
30 echo "$UTF8" >expect &&
31 git -c core.quotepath=false ls-files >actual &&
32 test_cmp expect actual
36 test_expect_success 'Clone repo containing iso8859-1 encoded paths with git-p4.pathEncoding' '
37 test_when_finished cleanup_git &&
41 git config git-p4.pathEncoding iso8859-1 &&
42 git p4 clone --use-client-spec --destination="$git" //depot &&
43 UTF8="$(printf "$UTF8_ESCAPED")" &&
44 echo "$UTF8" >expect &&
45 git -c core.quotepath=false ls-files >actual &&
46 test_cmp expect actual &&
48 echo content123 >expect &&
49 cat "$UTF8" >actual &&
50 test_cmp expect actual
54 test_expect_success 'Delete iso8859-1 encoded paths and clone' '
57 ISO8859="$(printf "$ISO8859_ESCAPED")" &&
58 p4 delete "$ISO8859" &&
59 p4 submit -d "remove file"
61 git p4 clone --destination="$git" //depot@all &&
62 test_when_finished cleanup_git &&
65 git -c core.quotepath=false ls-files >actual &&
66 test_must_be_empty actual
70 test_expect_success 'kill p4d' '