bug-idutils
[Top][All Lists]
Advanced

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

Re: [bug-idutils] [PATCH] tests: use "compare exp out", not "compare out


From: Claudio Fontana
Subject: Re: [bug-idutils] [PATCH] tests: use "compare exp out", not "compare out exp"
Date: Tue, 29 Nov 2011 18:34:01 +0100

Hi Jim,

On Tue, Nov 29, 2011 at 6:12 PM, Jim Meyering <address@hidden> wrote:
> FYI,
>
> From c34b33c455a5d266bf4b5d0259ac214bb05bca0b Mon Sep 17 00:00:00 2001
> From: Jim Meyering <address@hidden>
> Date: Tue, 29 Nov 2011 18:11:46 +0100
> Subject: [PATCH] tests: use "compare exp out", not "compare out exp"
>
> Likewise, when an empty file is expected, use "compare /dev/null out",
> not "compare out /dev/null". I.e., specify the expected/desired contents
> via the first file name.  Prompted by a suggestion from Bruno Haible
> in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154

Yes, it's what one would .. expect :P
(makes more sense).

Ciao, C.

> Run these commands:
>
>    git grep -l -E 'compare [^ ]+ exp' \
>      |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
>    git grep -l -E 'compare [^ ]+ /dev/null' \
>      |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'
>
> [here, there were none of the latter]
> ---
>  testsuite/lid-radix |    4 ++--
>  testsuite/lid-range |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/testsuite/lid-radix b/testsuite/lid-radix
> index 63922ba..918391e 100755
> --- a/testsuite/lid-radix
> +++ b/testsuite/lid-radix
> @@ -40,11 +40,11 @@ for i in d o x; do
>  done
>
>  lid --key=none 0xff > out || fail=1
> -compare out exp.all || fail=1
> +compare exp.all out || fail=1
>
>  for i in d o x; do
>   lid --key=none -$i 0xff > out || fail=1
> -  compare out exp.$i || fail=1
> +  compare exp.$i out || fail=1
>  done
>
>  Exit $fail
> diff --git a/testsuite/lid-range b/testsuite/lid-range
> index 783ba26..10747ec 100755
> --- a/testsuite/lid-range
> +++ b/testsuite/lid-range
> @@ -34,7 +34,7 @@ one            in.txt
>  two            in.txt
>  EOF
>  lid -F ..2 > out || fail=1
> -compare out exp || fail=1
> +compare exp out || fail=1
>
>  cat <<\EOF > exp || framework_failure_
>  four           in.txt
> @@ -42,6 +42,6 @@ three          in.txt
>  two            in.txt
>  EOF
>  lid -F 2.. > out || fail=1
> -compare out exp || fail=1
> +compare exp out || fail=1
>
>  Exit $fail
> --
> 1.7.8.rc4
>
> _______________________________________________
> bug-idutils mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-idutils



reply via email to

[Prev in Thread] Current Thread [Next in Thread]