Re: [PATCH] Fix a false negative in t5512 when run using sh -x

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

 



On Mon, May 10, 2010 at 3:19 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:
> The test compares the stderr of a git command called with test_must_fail
> to some expected output. With bash (and probably other shells as well)
> when run with -x turned on, command trace output ends up in the captured
> output. Of course, the actual output does not match the expected output
> anymore.
>
> Use 'grep' to check for expected output.
[snip]
> @@ -103,7 +99,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
>        # We could just as easily have used "master"; the "*" emphasizes its
>        # role as a pattern.
>        test_must_fail git ls-remote refs*master >actual 2>&1 &&
> -       test_cmp exp actual
> +       grep "does not appear to be a git repository" actual
>
>  '

for the sake of cross-platform/shell, I think this trade-off is acceptable.

  Acked-by: Tay Ray Chuan <rctay89@xxxxxxxxx>

-- 
Cheers,
Ray Chuan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]