summaryrefslogtreecommitdiffstats
path: root/testsuite/lid-range
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-29 18:11:46 +0100
committerJim Meyering <meyering@redhat.com>2011-11-29 18:11:46 +0100
commitc34b33c455a5d266bf4b5d0259ac214bb05bca0b (patch)
treea15e3cd0519c7bffcef1d058d62272d85220f724 /testsuite/lid-range
parentfe2227e16add53650558525a21c05b712a134bb7 (diff)
downloadidutils-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]
Diffstat (limited to 'testsuite/lid-range')
-rwxr-xr-xtestsuite/lid-range4
1 files changed, 2 insertions, 2 deletions
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