2004-12-31 16:12:38 +00:00
|
|
|
--- grep-2.5.1/tests/Makefile.am.jj 2001-03-07 05:11:27.000000000 +0100
|
|
|
|
+++ grep-2.5.1/tests/Makefile.am 2004-12-31 11:42:41.595492300 +0100
|
|
|
|
@@ -3,7 +3,8 @@
|
|
|
|
AWK=@AWK@
|
|
|
|
|
|
|
|
TESTS = warning.sh khadafy.sh spencer1.sh bre.sh ere.sh \
|
|
|
|
- status.sh empty.sh options.sh backref.sh file.sh
|
|
|
|
+ status.sh empty.sh options.sh backref.sh file.sh \
|
|
|
|
+ fmbtest.sh
|
|
|
|
EXTRA_DIST = $(TESTS) \
|
|
|
|
khadafy.lines khadafy.regexp \
|
|
|
|
spencer1.awk spencer1.tests \
|
2005-01-07 10:34:34 +00:00
|
|
|
--- grep-2.5.1/tests/fmbtest.sh 2004-12-31 13:30:23.942871250 +0100
|
|
|
|
+++ grep-2.5.1/tests/fmbtest.sh 2004-12-31 14:09:13.219463855 +0100
|
|
|
|
@@ -0,0 +1,111 @@
|
2004-12-31 16:12:38 +00:00
|
|
|
+#!/bin/sh
|
|
|
|
+
|
|
|
|
+: ${srcdir=.}
|
|
|
|
+
|
|
|
|
+# If cs_CZ.UTF-8 locale doesn't work, skip this test silently
|
|
|
|
+LC_ALL=cs_CZ.UTF-8 locale -k LC_CTYPE 2>/dev/null | ${GREP} -q charmap.*UTF-8 \
|
|
|
|
+ || exit 77
|
|
|
|
+
|
|
|
|
+failures=0
|
|
|
|
+
|
|
|
|
+cat > csinput <<EOF
|
|
|
|
+01 Žluťoučká číše
|
|
|
|
+ČíŠE 02
|
|
|
|
+03 Z číší Čiší cosi
|
|
|
|
+04 Čí
|
|
|
|
+Še 05
|
|
|
|
+06 ČČČČČČČíšČÍŠčíš
|
|
|
|
+07 ČČČ ČČČČíšČÍŠčíšEEEE
|
|
|
|
+čAs 08
|
|
|
|
+09Čapka
|
|
|
|
+10ČaSy se měnÍ
|
|
|
|
+ČÍšE11
|
|
|
|
+Čas12
|
|
|
|
+𝇕ČÍšE𝇓13
|
|
|
|
+ŽČÍšE𝇓14
|
|
|
|
+𝇕ČÍšEŽ15
|
|
|
|
+ŽČÍšEŽ16
|
|
|
|
+ČÍšE𝇓17
|
|
|
|
+ČÍšEŽ18
|
|
|
|
+19𝇕ČÍše
|
|
|
|
+20ŽČÍše
|
|
|
|
+EOF
|
|
|
|
+cat > cspatfile <<EOF
|
|
|
|
+ČÍšE
|
|
|
|
+Čas
|
|
|
|
+EOF
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+for mode in F G E; do
|
|
|
|
+
|
|
|
|
+test1="$(echo `LC_ALL=cs_CZ.UTF-8 ${GREP} -${mode} -f cspatfile csinput \
|
2004-12-31 16:12:38 +00:00
|
|
|
+ | LC_ALL=C sed 's/^.*\([0-9][0-9]\).*$/\1/'`)"
|
|
|
|
+if test "$test1" != "11 12 13 14 15 16 17 18"; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ echo "Test #1 ${mode} failed: $test1"
|
2004-12-31 16:12:38 +00:00
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+test2="$(echo `LC_ALL=cs_CZ.UTF-8 ${GREP} -${mode}i -f cspatfile csinput \
|
2004-12-31 16:12:38 +00:00
|
|
|
+ | LC_ALL=C sed 's/^.*\([0-9][0-9]\).*$/\1/'`)"
|
|
|
|
+if test "$test2" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ echo "Test #2 ${mode} failed: $test2"
|
2004-12-31 16:12:38 +00:00
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+test3="$(echo `LC_ALL=cs_CZ.UTF-8 ${GREP} -${mode}i -e 'ČÍšE' -e 'Čas' csinput \
|
2004-12-31 16:12:38 +00:00
|
|
|
+ | LC_ALL=C sed 's/^.*\([0-9][0-9]\).*$/\1/'`)"
|
|
|
|
+if test "$test3" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ echo "Test #3 ${mode} failed: $test3"
|
2004-12-31 16:12:38 +00:00
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+test4="$(echo `LC_ALL=cs_CZ.UTF-8 ${GREP} -${mode}iw -f cspatfile csinput \
|
2004-12-31 16:12:38 +00:00
|
|
|
+ | LC_ALL=C sed 's/^.*\([0-9][0-9]\).*$/\1/'`)"
|
|
|
|
+if test "$test4" != "01 02 08 13 17 19"; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ echo "Test #4 ${mode} failed: $test4"
|
2004-12-31 16:12:38 +00:00
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+done
|
|
|
|
+
|
|
|
|
+# Test that -F --color=always prefers longer matches.
|
2004-12-31 16:12:38 +00:00
|
|
|
+test5="`echo 'Cosi tu ČišÍ...' \
|
|
|
|
+ | LC_ALL=cs_CZ.UTF-8 ${GREP} --color=always -Fi -e 'čiš' -e 'čiší'`"
|
2005-01-07 12:42:51 +00:00
|
|
|
+if echo "$test5" | LC_ALL=C ${GREP} -q 'Cosi tu .*\[.*mČišÍ.*\[.*m\(.\[K\)\?\.\.\.'; then
|
2004-12-31 16:12:38 +00:00
|
|
|
+ :
|
|
|
|
+else
|
2005-01-07 10:34:34 +00:00
|
|
|
+ echo "Test #5 F failed: $test5"
|
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+for mode in G E; do
|
|
|
|
+
|
|
|
|
+# Test that -{G,E} --color=always prefers earlier pattern matches.
|
|
|
|
+test6="`echo 'Cosi tu ČišÍ...' \
|
|
|
|
+ | LC_ALL=cs_CZ.UTF-8 ${GREP} --color=always -${mode}i -e 'čiš' -e 'čiší'`"
|
2005-01-07 12:42:51 +00:00
|
|
|
+if echo "$test6" | LC_ALL=C ${GREP} -q 'Cosi tu .*\[.*mČiš.*\[.*m\(.\[K\)\?Í\.\.\.'; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ :
|
|
|
|
+else
|
|
|
|
+ echo "Test #6 ${mode} failed: $test6"
|
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+# Test that -{G,E} --color=always prefers earlier pattern matches.
|
|
|
|
+test7="`echo 'Cosi tu ČišÍ...' \
|
|
|
|
+ | LC_ALL=cs_CZ.UTF-8 ${GREP} --color=always -${mode}i -e 'čiší' -e 'čiš'`"
|
2005-01-07 12:42:51 +00:00
|
|
|
+if echo "$test7" | LC_ALL=C ${GREP} -q 'Cosi tu .*\[.*mČišÍ.*\[.*m\(.\[K\)\?\.\.\.'; then
|
2005-01-07 10:34:34 +00:00
|
|
|
+ :
|
|
|
|
+else
|
|
|
|
+ echo "Test #7 ${mode} failed: $test7"
|
2004-12-31 16:12:38 +00:00
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
2005-01-07 10:34:34 +00:00
|
|
|
+test8="$(echo `LC_ALL=cs_CZ.UTF-8 ${GREP} -${mode}i -e 'Č.šE' -e 'Č[a-f]s' csinput \
|
|
|
|
+ | LC_ALL=C sed 's/^.*\([0-9][0-9]\).*$/\1/'`)"
|
|
|
|
+if test "$test8" != "01 02 07 08 10 11 12 13 14 15 16 17 18 19 20"; then
|
|
|
|
+ echo "Test #8 ${mode} failed: $test8"
|
|
|
|
+ failures=1
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
+done
|
|
|
|
+
|
2004-12-31 16:12:38 +00:00
|
|
|
+exit $failures
|
|
|
|
--- grep-2.5.1/tests/Makefile.in.jj 2004-12-31 11:42:53.000000000 +0100
|
|
|
|
+++ grep-2.5.1/tests/Makefile.in 2004-12-31 11:43:36.871514505 +0100
|
|
|
|
@@ -97,7 +97,8 @@ install_sh = @install_sh@
|
|
|
|
AWK = @AWK@
|
|
|
|
|
|
|
|
TESTS = warning.sh khadafy.sh spencer1.sh bre.sh ere.sh \
|
|
|
|
- status.sh empty.sh options.sh backref.sh file.sh
|
|
|
|
+ status.sh empty.sh options.sh backref.sh file.sh \
|
|
|
|
+ fmbtest.sh
|
|
|
|
|
|
|
|
EXTRA_DIST = $(TESTS) \
|
|
|
|
khadafy.lines khadafy.regexp \
|