SZEDER Gábor wrote:
> The 'basic' test uses 'grep -q' to filter the resulting possible
> completion words while looking for the presence or absence of certain
> git commands, and relies on grep's exit status to indicate a failure.
> To make testers' life easier provide some output about the failed
> condition: store the results of the filtering in a file and compare
> its contents to the expected results by the good old test_cmp helper.
Looks good. I wonder if this points to the need for a test_grep
helper more generally.
> run_completion "git f" &&
> - ! grep -q -v "^f" out
> + >expected &&
> + sed -n "/^[^f]/p" out >out2 &&
> + test_cmp expected out2
Functional change: before, this would fail if "out" contained a blank
line, while afterward it does not. I doubt that matters, though.
Thanks and hope that helps,
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html