summaryrefslogtreecommitdiff
path: root/tests/case-fold-char-range
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-char-range
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-char-range')
-rw-r--r--tests/case-fold-char-range10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/case-fold-char-range b/tests/case-fold-char-range
index 6db53981..98978b06 100644
--- a/tests/case-fold-char-range
+++ b/tests/case-fold-char-range
@@ -7,16 +7,18 @@ printf 'A\nZ\n' > exp1 || framework_failure
fail=0
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf 'A\n1\nZ\n.\n' | LC_ALL=$LOC grep -i '[a-z]' > out1-$LOC || fail=1
- compare out1-$LOC exp1 || fail=1
+ out=out1-$LOC
+ printf 'A\n1\nZ\n.\n' | LC_ALL=$LOC grep -i '[a-z]' > $out || fail=1
+ compare $out exp1 || fail=1
done
# This actually passes also for grep-2.5.3
printf 'a\nz\n' > exp2 || framework_failure
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf 'a\n1\nz\n.\n' | LC_ALL=$LOC grep -i '[A-Z]' > out2-$LOC || fail=1
- compare out2-$LOC exp2 || fail=1
+ out=out2-$LOC
+ printf 'a\n1\nz\n.\n' | LC_ALL=$LOC grep -i '[A-Z]' > $out || fail=1
+ compare $out exp2 || fail=1
done
Exit $fail