diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:11:46 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:11:46 +0100 |
commit | c34b33c455a5d266bf4b5d0259ac214bb05bca0b (patch) | |
tree | a15e3cd0519c7bffcef1d058d62272d85220f724 | |
parent | fe2227e16add53650558525a21c05b712a134bb7 (diff) | |
download | idutils-c34b33c455a5d266bf4b5d0259ac214bb05bca0b.tar.gz idutils-c34b33c455a5d266bf4b5d0259ac214bb05bca0b.tar.bz2 idutils-c34b33c455a5d266bf4b5d0259ac214bb05bca0b.zip |
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
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]
-rwxr-xr-x | testsuite/lid-radix | 4 | ||||
-rwxr-xr-x | 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 |