summaryrefslogtreecommitdiff
path: root/tests/char-class-multibyte
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-29 17:06:11 +0100
committerJim Meyering <meyering@redhat.com>2011-11-29 17:06:50 +0100
commit5f2a03af5258eabb1263e58229fd4d1f395ca14a (patch)
treecf89f94c7a33bfbcccadbedb893a9b6f9a861a0d /tests/char-class-multibyte
parent8798244b1f23c7df8db079747308c1417254a0ca (diff)
downloadgrep-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/char-class-multibyte')
-rwxr-xr-xtests/char-class-multibyte4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/char-class-multibyte b/tests/char-class-multibyte
index 88b8fa07..fae75116 100755
--- a/tests/char-class-multibyte
+++ b/tests/char-class-multibyte
@@ -11,7 +11,7 @@ fail=0
for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
out=out1-$LOC
printf 'á\nç\né\n' | LC_ALL=$LOC grep '[é]' > $out || fail=1
- compare $out exp1 || fail=1
+ compare exp1 $out || fail=1
done
printf 'É\n' > exp2 || framework_failure_
@@ -19,7 +19,7 @@ printf 'É\n' > exp2 || framework_failure_
for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
out=out2-$LOC
printf 'Á\nÇ\nÉ\n' | LC_ALL=$LOC grep '[É]' > $out || fail=1
- compare $out exp2 || fail=1
+ compare exp2 $out || fail=1
done
for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do