• J
    t: use test_might_fail for diff and grep · 35da1bf5
    Jeff King 提交于
    Some tests run diff or grep to produce an output, and then
    compare the output to an expected value. We know the exit
    code we expect these processes to have (e.g., grep yields 0
    if it produced output and 1 otherwise), so it would not make
    the test wrong to look for it. But the difference between
    their output and the expected output (e.g., shown by
    test_cmp) is much more useful to somebody debugging the test
    than the test just bailing out.
    
    These tests break the &&-chain to skip the exit-code check
    of the process. However, we can get the same effect by using
    test_might_fail. Note that in some cases the test did use
    "|| return 1", which meant the test was not wrong, but it
    did fool --chain-lint.
    Signed-off-by: NJeff King <peff@peff.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    35da1bf5
t5550-http-fetch-dumb.sh 8.2 KB