| test_description='git grep in binary files' |
| test_expect_success 'setup' " |
| printf 'binary\000file\n' >a && |
| test_expect_success 'git grep ina a' ' |
| echo Binary file a matches >expect && |
| git grep ina a >actual && |
| test_expect_success 'git grep -ah ina a' ' |
| git grep -ah ina a >actual && |
| test_expect_success 'git grep -I ina a' ' |
| test_must_fail git grep -I ina a >actual && |
| test_expect_success 'git grep -c ina a' ' |
| git grep -c ina a >actual && |
| test_expect_success 'git grep -l ina a' ' |
| git grep -l ina a >actual && |
| test_expect_success 'git grep -L bar a' ' |
| git grep -L bar a >actual && |
| test_expect_success 'git grep -q ina a' ' |
| git grep -q ina a >actual && |
| test_expect_success 'git grep -F ile a' ' |