3 test_description='interaction with P4 case-folding'
7 test_expect_success 'start p4d with case folding enabled' '
11 test_expect_success 'Create a repo, name is lowercase' '
13 client_view "//depot/... //client/..." &&
16 >lc/file.txt && >UC/file.txt &&
17 p4 add lc/file.txt UC/file.txt &&
18 p4 submit -d "Add initial lc and UC repos"
22 test_expect_success 'Check p4 is in case-folding mode' '
27 test_must_fail p4 submit -d "Cannot add file differing only in case" lc/FILE.TXT
31 # Check we created the repo properly
32 test_expect_success 'Clone lc repo using lc name' '
33 git p4 clone //depot/lc/... &&
34 test_path_is_file lc/file.txt &&
35 git p4 clone //depot/UC/... &&
36 test_path_is_file UC/file.txt
39 # The clone should fail, since there is no repo called LC, but because
40 # we have case-insensitive p4d enabled, it appears to go ahead and work,
41 # but leaves an empty git repo in place.
42 test_expect_failure 'Clone lc repo using uc name' '
43 test_must_fail git p4 clone //depot/LC/...
46 test_expect_failure 'Clone UC repo with lc name' '
47 test_must_fail git p4 clone //depot/uc/...
50 test_expect_success 'kill p4d' '