Re: [PATCH v3 1/4] test: use "test_grep"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Leon Michalak via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Leon Michalak <leonmichalak6@xxxxxxxxx>
>
> Use the modern "test_grep" test utility instead of regular "grep" which
> provides better debug information if tests fail.
>
> This is a prerequisite to the commits that follow which add to both test
> files.

Just a terminology thing, but we would phrase the last paragraph
more like

    As a preparatory clean-up, use the "test_grep" test utility
    instead of regular "grep" which provides better debug
    information if tests fail.

to avoid saying "This does X", "This commit is Y", etc.  It also
avoids giving a wrong impression by misusing the word "prerequisite"
which we almost always use for a step that cannot be skipped.  While
we add new tests to the same file, we _could_ leave these existing
tests as-is, but there is a good reason to making this change
beforehand, which we often call is a "preparatory clean-up".

> @@ -86,7 +86,7 @@ test_expect_success 'revert works (initial)' '
>  	git add file &&
>  	test_write_lines r 1 | git add -i &&
>  	git ls-files >output &&
> -	! grep . output
> +	test_grep ! . output
>  '

Good (we sometime see people got the negation wrong).

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux