Re: [PATCH] t6022: Use -eq not = to test output of wc -l
On Mon, Nov 15, 2010 at 23:21, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index a417bdf..3088322 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -613,7 +613,10 @@ test_line_count () {
> if test $# != 3
> then
> error "bug in the test script: not 3 parameters to test_line_count"
> - elif ! test $(wc -l <"$3") "$1" "$2"
> + elif case "$3" in
> + !*) ! test $( eval "${3#!}" | wc -l ) "$1" "$2" ;;
> + *) ! test $( wc -l <"$3" ) "$1" "$2" ;;
> + esac
> then
> echo "test_line_count: line count for $3 !$1 $2"
> cat "$3"This line will fail for the !* case.
Bert