3 test_description='ls-files tests with relative paths
5 This test runs git ls-files with various relative path arguments.
14 test_expect_success 'prepare' '
16 git add never-mind-me &&
21 x="x xa xbc xdef xghij xklmno" &&
22 y=$(echo "$x" | tr x y) &&
30 test_expect_success 'ls-files with mixed levels' '
37 git ls-files $(cat expect) >actual &&
38 test_cmp expect actual
42 test_expect_success 'ls-files -c' '
47 echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
49 echo "Did you forget to ${sq}git add${sq}?" >>expect &&
51 test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual 2>&1 &&
52 test_cmp expect actual
56 test_expect_success 'ls-files -o' '
61 echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
63 echo "Did you forget to ${sq}git add${sq}?" >>expect &&
65 test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual 2>&1 &&
66 test_cmp expect actual