summaryrefslogtreecommitdiff
path: root/tests/case-fold-backref
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2010-03-17 10:17:34 +0100
committerPaolo Bonzini <bonzini@gnu.org>2010-03-17 10:17:34 +0100
commit77bb554c759ab305aa93950c82c0b70566d951ef (patch)
tree0ce879124c1299a8fc363aa8302c60c02af8c92e /tests/case-fold-backref
parentcf46bc2ef758dd1d0750fefca2f2cef247145c56 (diff)
downloadgrep-77bb554c759ab305aa93950c82c0b70566d951ef.tar.gz
tests: factor name of output files into a variable
* tests/case-fold-backref, tests/case-fold-char-class, tests/case-fold-char-range, tests/case-fold-char-type, tests/dfaexec-multibyte: Use a variable for the output filename, as it is common to the grep and compare invocations.
Diffstat (limited to 'tests/case-fold-backref')
-rw-r--r--tests/case-fold-backref5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/case-fold-backref b/tests/case-fold-backref
index 528d847a..0af7a193 100644
--- a/tests/case-fold-backref
+++ b/tests/case-fold-backref
@@ -7,8 +7,9 @@ printf 'the the\nThe the\nTHE the\n' > exp1 || framework_failure
fail=0
for LOC in en_US.UTF-8 en_US zh_CN $LOCALE_FR_UTF8 C; do
- LC_ALL=$LOC grep -Ei '(the) \1' exp1 > out1-$LOC || fail=1
- compare out1-$LOC exp1 || fail=1
+ out=out1-$LOC
+ LC_ALL=$LOC grep -Ei '(the) \1' exp1 > $out || fail=1
+ compare $out exp1 || fail=1
done
Exit $fail