grep: add a test helper function for less verbose -f \0 tests