3 test_description
='interaction with P4 case-folding'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 if test_have_prereq CASE_INSENSITIVE_FS
10 skip_all
='skipping P4 case-folding tests; case insensitive file system detected'
14 test_expect_success
'start p4d with case folding enabled' '
18 test_expect_success
'Create a repo, name is lowercase' '
20 client_view "//depot/... //client/..." &&
23 >lc/file.txt && >UC/file.txt &&
24 p4 add lc/file.txt UC/file.txt &&
25 p4 submit -d "Add initial lc and UC repos"
29 test_expect_success
'Check p4 is in case-folding mode' '
34 ! p4 submit -d "Cannot add file differing only in case" lc/FILE.TXT
38 # Check we created the repo properly
39 test_expect_success
'Clone lc repo using lc name' '
40 git p4 clone //depot/lc/... &&
41 test_path_is_file lc/file.txt &&
42 git p4 clone //depot/UC/... &&
43 test_path_is_file UC/file.txt
46 # The clone should fail, since there is no repo called LC, but because
47 # we have case-insensitive p4d enabled, it appears to go ahead and work,
48 # but leaves an empty git repo in place.
49 test_expect_failure
'Clone lc repo using uc name' '
50 test_must_fail git p4 clone //depot/LC/...
53 test_expect_failure
'Clone UC repo with lc name' '
54 test_must_fail git p4 clone //depot/uc/...