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 ISO8859
="$(printf "$ISO8859_ESCAPED")" &&
11 echo content123
>"$ISO8859" &&
13 skip_all
="fs does not accept ISO-8859-1 filenames"
17 test_expect_success
'start p4d' '
21 test_expect_success
'Create a repo containing iso8859-1 encoded paths' '
24 ISO8859="$(printf "$ISO8859_ESCAPED")" &&
25 echo content123 >"$ISO8859" &&
27 p4 submit -d "test commit"
31 test_expect_failure
'Clone auto-detects depot with iso8859-1 paths' '
32 git p4 clone --destination="$git" //depot &&
33 test_when_finished cleanup_git &&
36 UTF8="$(printf "$UTF8_ESCAPED")" &&
37 echo "$UTF8" >expect &&
38 git -c core.quotepath=false ls-files >actual &&
39 test_cmp expect actual
43 test_expect_success
'Clone repo containing iso8859-1 encoded paths with git-p4.pathEncoding' '
44 test_when_finished cleanup_git &&
48 git config git-p4.pathEncoding iso8859-1 &&
49 git p4 clone --use-client-spec --destination="$git" //depot &&
50 UTF8="$(printf "$UTF8_ESCAPED")" &&
51 echo "$UTF8" >expect &&
52 git -c core.quotepath=false ls-files >actual &&
53 test_cmp expect actual &&
55 echo content123 >expect &&
56 cat "$UTF8" >actual &&
57 test_cmp expect actual
61 test_expect_success
'Delete iso8859-1 encoded paths and clone' '
64 ISO8859="$(printf "$ISO8859_ESCAPED")" &&
65 p4 delete "$ISO8859" &&
66 p4 submit -d "remove file"
68 git p4 clone --destination="$git" //depot@all &&
69 test_when_finished cleanup_git &&
72 git -c core.quotepath=false ls-files >actual &&
73 test_must_be_empty actual