diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-29 17:06:11 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-29 17:06:50 +0100 |
commit | 5f2a03af5258eabb1263e58229fd4d1f395ca14a (patch) | |
tree | cf89f94c7a33bfbcccadbedb893a9b6f9a861a0d /tests/max-count-vs-context | |
parent | 8798244b1f23c7df8db079747308c1417254a0ca (diff) | |
download | grep-5f2a03af5258eabb1263e58229fd4d1f395ca14a.tar.gz |
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/(compare) (\S+) (exp\S*)/$1 $3 $2/'
git grep -l -E 'compare [^ ]+ /dev/null' \
|xargs perl -pi -e 's/(compare) (\S+) (\/dev\/null)/$1 $3 $2/'
Diffstat (limited to 'tests/max-count-vs-context')
-rwxr-xr-x | tests/max-count-vs-context | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/max-count-vs-context b/tests/max-count-vs-context index ec20728a..5633dd6a 100755 --- a/tests/max-count-vs-context +++ b/tests/max-count-vs-context @@ -17,7 +17,7 @@ sed 4q in > exp || framework_failure_ fail=0 grep -m1 -A5 needle in > out 2>err || fail=1 -compare out exp || fail=1 -compare err /dev/null || fail=1 +compare exp out || fail=1 +compare /dev/null err || fail=1 Exit $fail |