| test_description='ls-files tests with relative paths |
| This test runs git ls-files with various relative path arguments. |
| test_expect_success 'prepare' ' |
| x="x xa xbc xdef xghij xklmno" && |
| y=$(echo "$x" | tr x y) && |
| test_expect_success 'ls-files with mixed levels' ' |
| git ls-files $(cat expect) >actual && |
| test_expect_success 'ls-files -c' ' |
| echo "error: pathspec $sq$f$sq did not match any file(s) known to git" |
| echo "Did you forget to ${sq}git add${sq}?" >>expect.err && |
| test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err && |
| test_cmp expect.out actual.out && |
| test_i18ncmp expect.err actual.err |
| test_expect_success 'ls-files -o' ' |
| echo "error: pathspec $sq$f$sq did not match any file(s) known to git" |
| echo "Did you forget to ${sq}git add${sq}?" >>expect.err && |
| test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err && |
| test_cmp expect.out actual.out && |
| test_i18ncmp expect.err actual.err |