summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2010-03-17 09:42:19 +0100
committerPaolo Bonzini <bonzini@gnu.org>2010-03-17 09:42:19 +0100
commitcf46bc2ef758dd1d0750fefca2f2cef247145c56 (patch)
treeb6bd7157448225a7aa547f6db419966920ef2063 /tests
parent12043754720f27863e73e491a050018b75dc754b (diff)
downloadgrep-cf46bc2ef758dd1d0750fefca2f2cef247145c56.tar.gz
tests: use different output files to simplify reading failed .log files
* tests/case-fold-backref, tests/case-fold-char-class, tests/case-fold-char-range, tests/case-fold-char-type: Use a different name for each output file from grep. * tests/dfaexec-multibyte: Likewise, and merge some grep invocations.
Diffstat (limited to 'tests')
-rw-r--r--tests/case-fold-backref4
-rw-r--r--tests/case-fold-char-class8
-rw-r--r--tests/case-fold-char-range8
-rw-r--r--tests/case-fold-char-type8
-rw-r--r--tests/dfaexec-multibyte23
5 files changed, 22 insertions, 29 deletions
diff --git a/tests/case-fold-backref b/tests/case-fold-backref
index 01a2f1fe..528d847a 100644
--- a/tests/case-fold-backref
+++ b/tests/case-fold-backref
@@ -7,8 +7,8 @@ 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 || fail=1
- compare out1 exp1 || fail=1
+ LC_ALL=$LOC grep -Ei '(the) \1' exp1 > out1-$LOC || fail=1
+ compare out1-$LOC exp1 || fail=1
done
Exit $fail
diff --git a/tests/case-fold-char-class b/tests/case-fold-char-class
index 8b0ac926..46f0d4cd 100644
--- a/tests/case-fold-char-class
+++ b/tests/case-fold-char-class
@@ -7,15 +7,15 @@ printf 'Y\n' > exp1 || framework_failure
fail=0
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf 'X\nY\nZ\n' | LC_ALL=$LOC grep -i '[y]' > out1 || fail=1
- compare out1 exp1 || fail=1
+ printf 'X\nY\nZ\n' | LC_ALL=$LOC grep -i '[y]' > out1-$LOC || fail=1
+ compare out1-$LOC exp1 || fail=1
done
printf 'y\n' > exp2 || framework_failure
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf 'x\ny\nz\n' | LC_ALL=$LOC grep -i '[Y]' > out2 || fail=1
- compare out2 exp2 || fail=1
+ printf 'x\ny\nz\n' | LC_ALL=$LOC grep -i '[Y]' > out2-$LOC || fail=1
+ compare out2-$LOC exp2 || fail=1
done
Exit $fail
diff --git a/tests/case-fold-char-range b/tests/case-fold-char-range
index 9b3120fb..6db53981 100644
--- a/tests/case-fold-char-range
+++ b/tests/case-fold-char-range
@@ -7,16 +7,16 @@ 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 || fail=1
- compare out1 exp1 || fail=1
+ printf 'A\n1\nZ\n.\n' | LC_ALL=$LOC grep -i '[a-z]' > out1-$LOC || fail=1
+ compare out1-$LOC 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 || fail=1
- compare out2 exp2 || fail=1
+ printf 'a\n1\nz\n.\n' | LC_ALL=$LOC grep -i '[A-Z]' > out2-$LOC || fail=1
+ compare out2-$LOC exp2 || fail=1
done
Exit $fail
diff --git a/tests/case-fold-char-type b/tests/case-fold-char-type
index f3a19b4a..e2d48356 100644
--- a/tests/case-fold-char-type
+++ b/tests/case-fold-char-type
@@ -7,15 +7,15 @@ printf 'Y\n' > exp1 || framework_failure
fail=0
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf '1\nY\n.\n' | LC_ALL=$LOC grep -i '[[:lower:]]' > out1 || fail=1
- compare out1 exp1 || fail=1
+ printf '1\nY\n.\n' | LC_ALL=$LOC grep -i '[[:lower:]]' > out1-$LOC || fail=1
+ compare out1-$LOC exp1 || fail=1
done
printf 'y\n' > exp2 || framework_failure
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- printf '1\ny\n.\n' | LC_ALL=$LOC grep -i '[[:upper:]]' > out2 || fail=1
- compare out2 exp2 || fail=1
+ printf '1\ny\n.\n' | LC_ALL=$LOC grep -i '[[:upper:]]' > out2-$LOC || fail=1
+ compare out2-$LOC exp2 || fail=1
done
Exit $fail
diff --git a/tests/dfaexec-multibyte b/tests/dfaexec-multibyte
index 47db42bc..ea5c428d 100644
--- a/tests/dfaexec-multibyte
+++ b/tests/dfaexec-multibyte
@@ -3,27 +3,20 @@
: ${srcdir=.}
. "$srcdir/init.sh"; path_prepend_ ../src
-printf 'aa\n' > exp-aa || framework_failure
-printf 'ab\n' > exp-ab || framework_failure
-printf '1 2 3\n' > exp-123 || framework_failure
+printf 'aa\nab\nba\nbb\n' > exp1 || framework_failure
+printf '1 2 3\n' > exp2 || framework_failure
fail=0
for LOC in en_US.UTF-8 zh_CN $LOCALE_FR_UTF8; do
- LC_ALL=$LOC grep -E '([a]|[b]){2}' < exp-aa > out || fail=1
- compare out exp-aa || fail=1
+ LC_ALL=$LOC grep -E '([a]|[b]){2}' < exp1 > out1-ab-$LOC || fail=1
+ compare out1-ab-$LOC exp1 || fail=1
- LC_ALL=$LOC grep -E '([b]|[a]){2}' < exp-aa > out || fail=1
- compare out exp-aa || fail=1
+ LC_ALL=$LOC grep -E '([b]|[a]){2}' < exp1 > out1-ba-$LOC || fail=1
+ compare out1-ba-$LOC exp1 || fail=1
- LC_ALL=$LOC grep -E '([b]|[a]){2}' < exp-ab > out || fail=1
- compare out exp-ab || fail=1
-
- LC_ALL=$LOC grep -E '([a]|[b]){2}' < exp-ab > out || fail=1
- compare out exp-ab || fail=1
-
- LC_ALL=$LOC grep -E '^([[:digit:]]+[[:space:]]+){2}' < exp-123 > out || fail=1
- compare out exp-123 || fail=1
+ LC_ALL=$LOC grep -E '^([[:digit:]]+[[:space:]]+){2}' < exp2 > out2-$LOC || fail=1
+ compare out2-$LOC exp2 || fail=1
done