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