Removed by grep2netbsd script (do we want them in regress?).

This commit is contained in:
wiz 2003-02-13 08:04:16 +00:00
parent 5ae0afcbb2
commit fd87da38ec
25 changed files with 0 additions and 2041 deletions

View File

@ -1,21 +0,0 @@
## Process this file with automake to create Makefile.in
AWK=@AWK@
TESTS = warning.sh khadafy.sh spencer1.sh bre.sh ere.sh \
status.sh empty.sh options.sh backref.sh file.sh
EXTRA_DIST = $(TESTS) \
khadafy.lines khadafy.regexp \
spencer1.awk spencer1.tests \
bre.awk ere.awk bre.tests ere.tests
CLEANFILES = spencer1.script bre.script ere.script khadafy.out patfile
TESTS_ENVIRONMENT = \
AWK=$(AWK) \
GREP=$(top_builddir)/src/grep \
GREP_OPTIONS='' \
LC_ALL=C
# the *.sh when checkout does not have the right permission
# make sure everyting is ok.
dist-hook:
cd $(distdir); for i in $(TESTS); do chmod +x $$i; done

View File

@ -1,298 +0,0 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
EXEEXT = @EXEEXT@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
SEP = @SEP@
SYMLINK = @SYMLINK@
SYMLINKFROM = @SYMLINKFROM@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
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
EXTRA_DIST = $(TESTS) \
khadafy.lines khadafy.regexp \
spencer1.awk spencer1.tests \
bre.awk ere.awk bre.tests ere.tests
CLEANFILES = spencer1.script bre.script ere.script khadafy.out patfile
TESTS_ENVIRONMENT = \
AWK=$(AWK) \
GREP=$(top_builddir)/src/grep \
GREP_OPTIONS='' \
LC_ALL=C
subdir = tests
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DIST_COMMON = Makefile.am Makefile.in
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
list='$(TESTS)'; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
;; \
*) \
echo "PASS: $$tst"; \
;; \
esac; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
*) \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
;; \
esac; \
fi; \
done; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all tests failed"; \
else \
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
fi; \
fi; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
fi
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="${top_distdir}" distdir="$(distdir)" \
dist-hook
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am uninstall-info-am
# the *.sh when checkout does not have the right permission
# make sure everyting is ok.
dist-hook:
cd $(distdir); for i in $(TESTS); do chmod +x $$i; done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,38 +0,0 @@
#!/bin/sh
# Test that backrefs are local to regex.
#
#
: ${srcdir=.}
failures=0
# checking for a palindrome
echo "radar" | ${GREP} -e '\(.\)\(.\).\2\1' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "backref: palindrome, test \#1 failed"
failures=1
fi
# hit hard with the `Bond' tests
echo "civic" | ${GREP} -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Options: Bond, test \#2 failed"
failures=1
fi
# backref are local should be error
echo "123" | ${GREP} -e 'a\(.\)' -e 'b\1' > /dev/null 2>&1
if test $? -ne 2 ; then
echo "Options: Backref not local, test \#3 failed"
failures=1
fi
# Pattern should faile
echo "123" | ${GREP} -e '[' -e ']' > /dev/null 2>&1
if test $? -ne 2 ; then
echo "Options: Compiled not local, test \#3 failed"
failures=1
fi
exit $failures

View File

@ -1,27 +0,0 @@
BEGIN {
FS="@";
n = 0;
printf ("# Generated Spencer BRE Test\n");
printf ("failures=0\n");
}
$0 ~ /^#/ { next; }
NF == 3 {
# printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2);
printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $? ; }`\n",$3, $2);
printf ("if test $status -ne %s ; then\n", $1);
printf ("\techo Spencer bre test \\#%d failed\n", ++n);
printf ("\tfailures=1\n");
printf ("fi\n");
}
NF == 4 {
#don't alarm users
# printf ("echo '%s' | ${GREP} -e '%s' > /dev/null 2>&1\n",$3, $2);
# printf ("if test $? -ne %s ; then\n", $1);
# printf ("\techo Expected non conformance \\#%d ... continuing\n", ++n);
# printf ("fi\n");
}
END { printf ("exit $failures\n"); }

View File

@ -1,13 +0,0 @@
#!/bin/sh
# Regression test for GNU grep.
: ${srcdir=.}
failures=0
# . . . and the following by Henry Spencer.
${AWK-awk} -f $srcdir/bre.awk $srcdir/bre.tests > bre.script
sh bre.script && exit $failures
exit 1

View File

@ -1,62 +0,0 @@
0@a\(b\)c@abc
0@a(@a(
2@a\(@EPAREN
2@a\(b@EPAREN
0@a(b@a(b
0@a)@a)
2@a\)@EPAREN
2@\)@EPAREN
0@a\(\)b@ab
0@a^b@a^b@TO CORRECT
0@a$b@a$b
0@\($\)\(^\)@@
0@a*\(^b$\)c*@b
0@|@|
0@*@*
0@\(\)@abc
2@\(\{1\}a\)@BADRPT@TO CORRECT
0@^*@*
2@^\{1\}@BADRPT@TO CORRECT
0@\{@{
1@a\(b*\)c\1d@abbcbd
1@a\(b*\)c\1d@abbcbbbd
1@^\(.\)\1@abc
0@a\(\([bc]\)\2\)*d@abbccd
1@a\(\([bc]\)\2\)*d@abbcbd
0@a\(\(b\)*\2\)*d@abbbd
0@\(a\)\1bcd@aabcd
0@\(a\)\1bc*d@aabcd
0@\(a\)\1bc*d@aabd
0@\(a\)\1bc*d@aabcccd
0@\(a\)\1bc*[ce]d@aabcccd@TO CORRECT
0@^\(a\)\1b\(c\)*cd$@aabcccd
0@a\(*\)b@a*b
0@a\(**\)b@ab
2@a\(***\)b@BADRPT@TO CORRECT
0@*a@*a
0@**a@a
2@***a@BADRPT@TO CORRECT
0@a\{1\}b@ab
0@a\{1,\}b@ab
0@a\{1,2\}b@aab
2@a\{1@EBRACE
2@a\{1a@EBRACE
2@a\{1a\}@BADBR
2@a\{,2\}@BADBR
2@a\{,\}@BADBR
2@a\{1,x\}@BADBR
2@a\{1,x@EBRACE
2@a\{32768\}@BADBR
2@a\{1,0\}@BADBR
0@ab\{0,0\}c@abcac
0@ab\{0,1\}c@abcac
0@ab\{0,3\}c@abbcac
0@ab\{1,1\}c@acabc
0@ab\{1,3\}c@acabc
0@ab\{2,2\}c@abcabbc
0@ab\{2,4\}c@abcabbc
2@a\{1\}\{1\}@BADRPT@TO CORRECT
2@a*\{1\}@BADRPT@TO CORRECT
2@a\{1\}*@BADRPT@TO CORRECT
1@a\(b\)?c\1d@acd
0@-\{0,1\}[0-9]*$@-5

View File

@ -1,33 +0,0 @@
#!/bin/sh
# test that the empty file means no pattern
# and an empty pattern means match all.
: ${srcdir=.}
failures=0
for options in '-E' '-E -w' '-F -x' '-G -w -x'; do
# should return 0 found a match
echo "" | ${GREP} $options -e '' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Status: Wrong status code, test \#1 failed ($options)"
failures=1
fi
# should return 1 found no match
echo "abcd" | ${GREP} $options -f /dev/null > /dev/null 2>&1
if test $? -ne 1 ; then
echo "Status: Wrong status code, test \#2 failed ($options)"
failures=1
fi
# should return 0 found a match
echo "abcd" | ${GREP} $options -f /dev/null -e "abcd" > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Status: Wrong status code, test \#3 failed ($options)"
failures=1
fi
done
exit $failures

View File

@ -1,32 +0,0 @@
BEGIN {
FS="@";
n = 0;
printf ("# Generated Spencer ERE Test\n");
printf ("failures=0\n");
}
$0 ~ /^#/ { next; }
NF == 3 {
# printf ("status=`echo '%s' | { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2);
printf ("status=`echo '%s' | { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; }`\n",$3, $2);
printf ("if test $status -ne %s ; then\n", $1);
printf ("\techo Spencer ere test \\#%d failed\n", ++n);
printf ("\tfailures=1\n");
printf ("fi\n");
}
NF == 4 {
# don't alarm the user for now
# printf ("echo '%s'|${GREP} -E -e '%s' > /dev/null 2>&1\n",$3, $2);
# printf ("if test $? -ne %s ; then\n", $1);
# printf ("\techo Expected non conformance \\#%d ... continuing\n", ++n);
# printf ("fi\n");
}
NF == 5 {
# don't alarm the user for now
next;
}
END { printf ("exit $failures\n"); }

View File

@ -1,13 +0,0 @@
#!/bin/sh
# Regression test for GNU grep.
: ${srcdir=.}
failures=0
# . . . and the following by Henry Spencer.
${AWK-awk} -f $srcdir/ere.awk $srcdir/ere.tests > ere.script
sh ere.script && exit $failures
exit 1

View File

@ -1,215 +0,0 @@
0@a@a
0@abc@abc
0@abc|de@abc
0@a|b|c@abc
0@a(b)c@abc
2@a(@EPAREN
0@a\(@a(
2@a(b@EPAREN
0@a)@a)@POSIX BOTCH
0@)@)@POSIX BOTCH
0@a()b@ab
0@^abc$@abc
1@a^b@a^b
1@a$b@a$b
0@^@abc
0@$@abc
0@^$@@
0@$^@@
0@^^@@
0@$$@@
0@a*(^b$)c*@b
2@|@EMPTY@NO ALTERNATION
2@*@BADRPT@TO CORRECT
2@+@BADRPT@TO CORRECT
2@?@BADRPT@TO CORRECT
1@&C@PASS
0@()@abc
2@a||b@EMPTY@NO ALTERNATION
2@|ab@EMPTY@NO ALTERNATION
2@ab|@EMPTY@NO ALTERNATION
2@(|a)b@EMPTY@NO ALTERNATION
2@(a|)b@EMPTY@NO ALTERNATION
2@(*a)@BADRPT@TO CORRECT
2@(+a)@BADRPT@TO CORRECT
2@(?a)@BADRPT@TO CORRECT
2@({1}a)@BADRPT@TO CORRECT
2@(a|*b)@BADRPT@NO ALTERNATION
2@(a|+b)@BADRPT@NO ALTERNATION
2@(a|?b)@BADRPT@NO ALTERNATION
2@(a|{1}b)@BADRPT@NO ALTERNATION
2@^*@BADRPT@TO CORRECT
2@^+@BADRPT@TO CORRECT
2@^?@BADRPT@TO CORRECT
2@^{1}@BADRPT@TO CORRECT
0@a.c@abc
0@a[bc]d@abd
0@a\*c@a*c
0@a\\b@a\b@TO CORRECT
0@a\\\*b@a\*b@SHELL TROUBLE
0@a\bc@abc@TO CORRECT
2@a\@EESCAPE@SHELL TROUBLE
0@a\\bc@a\bc@TO CORRECT
0@a\[b@a[b
2@a[b@EBRACK
0@a$@a
1@a$@a$
1@a\$@a@SHELL TROUBLE
0@a\$@a$@SHELL TROUBLE
1@a\\$@a
1@a\\$@a$@SHELL TROUBLE
1@a\\$@a\$@SHELL TROUBLE
0@a\\$@a\@SHEL TROUBLE
0@ab*c@abc
0@ab+c@abc
0@ab?c@abc
0@{@{@TO CORRECT
0@{abc@{abc@TO CORRECT
0@{1@{1
2@{1}@BADRPT@TO CORRECT
0@a{b@a{b@TO CORRECT
0@a{1}b@ab
0@a{1,}b@ab
0@a{1,2}b@aab
0@a{1@a{1
1@a{1a@aa
0@a{1a}@a{1a}
0@a{,2}@a{,2}
0@a{,}@a{,}
0@a{1,*}@a{1,,,}
2@a{1,x@EBRACE@TO CORRECT
2@a{300}@BADBR@TO CORRECT
2@a{1,0}@BADBR@TO CORRECT
0@ab{0,0}c@abcac
0@ab{0,1}c@abcac
0@ab{0,3}c@abbcac
0@ab{1,1}c@acabc
0@ab{1,3}c@acabc
0@ab{2,2}c@abcabbc
0@ab{2,4}c@abcabbc
2@a**@BADRPT@TO CORRECT
2@a++@BADRPT@TO CORRECT
2@a??@BADRPT@TO CORRECT
2@a*+@BADRPT@TO CORRECT
2@a*?@BADRPT@TO CORRECT
2@a+*@BADRPT@TO CORRECT
2@a+?@BADRPT@TO CORRECT
2@a?*@BADRPT@TO CORRECT
2@a?+@BADRPT@TO CORRECT
2@a{1}{1}@BADRPT@TO CORRECT
2@a*{1}@BADRPT@TO CORRECT
2@a+{1}@BADRPT@TO CORRECT
2@a?{1}@BADRPT@TO CORRECT
2@a{1}*@BADRPT@TO CORRECT
2@a{1}+@BADRPT@TO CORRECT
2@a{1}?@BADRPT@TO CORRECT
0@a*{b}@a{b}@TO CORRECT
0@a[b]c@abc
0@a[ab]c@abc
0@a[^ab]c@adc
0@a[]b]c@a]c
0@a[[b]c@a[c
0@a[-b]c@a-c
0@a[^]b]c@adc
0@a[^-b]c@adc
0@a[b-]c@a-c
2@a[b@EBRACK
2@a[]@EBRACK
0@a[1-3]c@a2c
2@a[3-1]c@ERANGE@TO CORRECT
2@a[1-3-5]c@ERANGE@TO CORRECT
0@a[[.-.]--]c@a-c@TO CORRECT
2@a[1-@ERANGE
2@a[[.@EBRACK
2@a[[.x@EBRACK
2@a[[.x.@EBRACK
2@a[[.x.]@EBRACK@TO CORRECT
0@a[[.x.]]@ax@TO CORRECT
2@a[[.x,.]]@ECOLLATE@TO CORRECT
0@a[[.one.]]b@a1b@TO CORRECT
2@a[[.notdef.]]b@ECOLLATE@TO CORRECT
0@a[[.].]]b@a]b@TO CORRECT
0@a[[:alpha:]]c@abc
2@a[[:notdef:]]c@ECTYPE
2@a[[:@EBRACK
2@a[[:alpha@EBRACK
2@a[[:alpha:]@EBRACK
2@a[[:alpha,:]@ECTYPE
2@a[[:]:]]b@ECTYPE
2@a[[:-:]]b@ECTYPE
2@a[[:alph:]]@ECTYPE
2@a[[:alphabet:]]@ECTYPE
0@[[:digit:]]+@a019b
0@[[:lower:]]+@AabC
0@[[:upper:]]+@aBCd
0@[[:xdigit:]]+@p0f3Cq
0@a[[=b=]]c@abc@TO CORRECT
2@a[[=@EBRACK
2@a[[=b@EBRACK
2@a[[=b=@EBRACK
2@a[[=b=]@EBRACK@TO CORRECT
2@a[[=b,=]]@ECOLLATE@TO CORRECT
0@a[[=one=]]b@a1b@TO CORRECT
0@a(((b)))c@abc
0@a(b|(c))d@abd
0@a(b*|c)d@abbd
0@a[ab]{20}@aaaaabaaaabaaaabaaaab
0@a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab]@aaaaabaaaabaaaabaaaab
0@a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night)@aaaaabaaaabaaaabaaaabweeknights
0@12345678901234567890123456789@a12345678901234567890123456789b
0@123456789012345678901234567890@a123456789012345678901234567890b
0@1234567890123456789012345678901@a1234567890123456789012345678901b
0@12345678901234567890123456789012@a12345678901234567890123456789012b
0@123456789012345678901234567890123@a123456789012345678901234567890123b
0@1234567890123456789012345678901234567890123456789012345678901234567890@a1234567890123456789012345678901234567890123456789012345678901234567890b
0@[ab][cd][ef][gh][ij][kl][mn]@xacegikmoq
0@[ab][cd][ef][gh][ij][kl][mn][op]@xacegikmoq
0@[ab][cd][ef][gh][ij][kl][mn][op][qr]@xacegikmoqy
0@[ab][cd][ef][gh][ij][kl][mn][op][q]@xacegikmoqy
0@abc@xabcy
0@aBc@Abc@TO CORRECT
0@a[Bc]*d@abBCcd@TO CORRECT
0@0[[:upper:]]1@0a1@TO CORRECT
0@0[[:lower:]]1@0A1@TO CORRECT
1@a[^b]c@abc
1@a[^b]c@aBc@TO CORRECT
0@a[^b]c@adc
0@[a]b[c]@abc
0@[a]b[a]@aba
0@[abc]b[abc]@abc
0@[abc]b[abd]@abd
0@a(b?c)+d@accd
0@(wee|week)(knights|night)@weeknights
0@(we|wee|week|frob)(knights|night|day)@weeknights
0@a[bc]d@xyzaaabcaababdacd
0@a[ab]c@aaabc
0@a*@b
0@/\*.*\*/@/*x*/
0@/\*.*\*/@/*x*/y/*z*/
0@/\*([^*]|\*[^/])*\*/@/*x*/
0@/\*([^*]|\*[^/])*\*/@/*x*/y/*z*/
0@/\*([^*]|\*[^/])*\*/@/*x**/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x*/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x**/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x****/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x**x*/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x***x/y/*z*/
0@aZb@a@TO CORRECT
0@[[:<:]]a@a@TO CORRECT
1@[[:<:]]a@ba@TO CORRECT
0@[[:<:]]a@-a@TO CORRECT
0@a[[:>:]]@a@TO CORRECT
1@a[[:>:]]@ab@TO CORRECT
0@a[[:>:]]@a-@TO CORRECT
0@[[:<:]]a.c[[:>:]]@axcd-dayc-dazce-abc@TO CORRECT
0@[[:<:]]a.c[[:>:]]@axcd-dayc-dazce-abc-q@TO CORRECT
0@[[:<:]]a.c[[:>:]]@axc-dayc-dazce-abc@TO CORRECT
0@[[:<:]]b.c[[:>:]]@a_bxc-byc_d-bzc-q@TO CORRECT
0@[[:<:]].x..[[:>:]]@y_xa_-_xb_y-_xc_-axdc@TO CORRECT
1@[[:<:]]a_b[[:>:]]@x_a_b@TO CORRECT
0@(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A])@A1
0@abcdefghijklmnop@abcdefghijklmnop
0@abcdefghijklmnopqrstuv@abcdefghijklmnopqrstuv
0@CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a@CC11
0@a?b@ab

View File

@ -1,59 +0,0 @@
#!/bin/sh
# Test for POSIX.2 options for grep
#
# grep -E -f pattern_file file
# grep -F -f pattern_file file
# grep -G -f pattern_file file
#
: ${srcdir=.}
failures=0
cat <<EOF >patfile
radar
MILES
GNU
EOF
# match
echo "miles" | ${GREP} -i -E -f patfile > /dev/null 2>&1
if test $? -ne 0 ; then
echo "File_pattern: Wrong status code, test \#1 failed"
failures=1
fi
# match
echo "GNU" | ${GREP} -G -f patfile > /dev/null 2>&1
if test $? -ne 0 ; then
echo "File_pattern: Wrong status code, test \#2 failed"
failures=1
fi
# checking for no match
echo "ridar" | ${GREP} -F -f patfile > /dev/null 2>&1
if test $? -ne 1 ; then
echo "File_pattern: Wrong status code, test \#3 failed"
failures=1
fi
cat <<EOF >patfile
EOF
# empty pattern : every match
echo "abbcd" | ${GREP} -F -f patfile > /dev/null 2>&1
if test $? -ne 0 ; then
echo "File_pattern: Wrong status code, test \#4 failed"
failures=1
fi
cp /dev/null patfile
# null pattern : no match
echo "abbcd" | ${GREP} -F -f patfile > /dev/null 2>&1
if test $? -ne 1 ; then
echo "File_pattern: Wrong status code, test \#5 failed"
failures=1
fi
exit $failures

View File

@ -1,55 +0,0 @@
#
# Basic Regular Expression
# kip comments
$0 ~ /^#/ { next; }
# skip those option specific to regexec/regcomp
$2 ~ /[msnr$#p^]/ { next; }
# skip empty lines
$0 ~ /^$/ { next; }
# debug
#{ printf ("<%s> <%s> <%s> <%s>\n", $1, $2, $3, $4); }
# subreg expresion
NF >= 5 { next; }
# errors
NF == 3 {
# gsub (/@/, ",");
# it means empty lines
gsub (/\"\"/, "");
# escapes
gsub (/\\\'/, "\\\'\'");
# error in regex
if (index ($2, "C") != 0)
{
if (index ($2, "b") != 0)
printf ("2@%s@%s\n", $1, $3);
}
# erro no match
else
{
if (index ($2, "b") != 0)
printf ("1@%s@%s\n", $1, $3);
}
next;
}
# ok
NF == 4 {
# skip those magic cookies can't rely on echo to gnerate them
if (match($3, /[NSTZ]/))
next;
# gsub (/@/, ",");
# it means empty lines
gsub (/\"\"/, "");
# escape escapes
gsub (/\\\'/, "\\\'\'");
if (index ($2, "b") != 0)
printf ("0@%s@%s\n", $1, $3);
}

View File

@ -1,60 +0,0 @@
#
# Extended Regular Expression
# skip comments
$0 ~ /^#/ { next; }
# skip specifics to regcomp/regexec
$2 ~ /[msnr$#p^]/ { next; }
# jump empty lines
$0 ~ /^$/ { next; }
# subreg skip
NF >= 5 { next; }
# debug
#{ printf ("<%s> <%s> <%s> <%s>\n", $1, $2, $3, $4); }
# errors
NF == 3 {
# nuke any remaining '@'
# gsub (/@/, ",");
# it means empty lines
gsub (/\"\"/, "");
# escapes
gsub (/\\\'/, "\\\'\'");
# error in regex
if (index ($2, "C") != 0)
{
if (index ($2, "b") == 0)
printf ("2@%s@%s\n", $1, $3);
}
# error not matching
else
{
if (index ($2, "b") == 0)
printf ("1@%s@%s\n", $1, $3);
}
next;
}
# ok
NF == 4 {
# skip those magic cookies can't rely on echo to gnerate them
if (match($3, /[NSTZ]/))
next;
# nuke any remaining '@'
# gsub (/@/, ",");
# it means empty lines
gsub (/\"\"/, "");
# escape escapes
gsub (/\\\'/, "\\\'\'");
if (index ($2, "b") == 0)
{
printf ("0@%s@%s\n", $1, $3);
}
next;
}

View File

@ -1,32 +0,0 @@
1) Muammar Qaddafi
2) Mo'ammar Gadhafi
3) Muammar Kaddafi
4) Muammar Qadhafi
5) Moammar El Kadhafi
6) Muammar Gadafi
7) Mu'ammar al-Qadafi
8) Moamer El Kazzafi
9) Moamar al-Gaddafi
10) Mu'ammar Al Qathafi
11) Muammar Al Qathafi
12) Mo'ammar el-Gadhafi
13) Moamar El Kadhafi
14) Muammar al-Qadhafi
15) Mu'ammar al-Qadhdhafi
16) Mu'ammar Qadafi
17) Moamar Gaddafi
18) Mu'ammar Qadhdhafi
19) Muammar Khaddafi
20) Muammar al-Khaddafi
21) Mu'amar al-Kadafi
22) Muammar Ghaddafy
23) Muammar Ghadafi
24) Muammar Ghaddafi
25) Muamar Kaddafi
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
29) Moammar Khadafy
30) Moammar Qudhafi
31) Mu'ammar al-Qaddafi
32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi

View File

@ -1 +0,0 @@
M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]

View File

@ -1,20 +0,0 @@
#!/bin/sh
# Regression test for GNU grep.
: ${srcdir=.}
: ${GREP=../src/grep}
failures=0
# The Khadafy test is brought to you by Scott Anderson . . .
${GREP} -E -f $srcdir/khadafy.regexp $srcdir/khadafy.lines > khadafy.out
if cmp $srcdir/khadafy.lines khadafy.out
then
:
else
echo Khadafy test failed -- output left on khadafy.out
failures=1
fi
exit $failures

View File

@ -1,36 +0,0 @@
#!/bin/sh
# Test for POSIX.2 options for grep
#
# grep [ -E| -F][ -c| -l| -q ][-insvx] -e pattern_list
# [-f pattern_file] ... [file. ..]
# grep [ -E| -F][ -c| -l| -q ][-insvx][-e pattern_list]
# -f pattern_file ... [file ...]
# grep [ -E| -F][ -c| -l| -q ][-insvx] pattern_list [file...]
#
: ${srcdir=.}
failures=0
# checking for -E extended regex
echo "abababccccccd" | ${GREP} -E -e 'c{3}' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Options: Wrong status code, test \#1 failed"
failures=1
fi
# checking for basic regex
echo "abababccccccd" | ${GREP} -G -e 'c\{3\}' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Options: Wrong status code, test \#2 failed"
failures=1
fi
# checking for fixed string
echo "abababccccccd" | ${GREP} -F -e 'c\{3\}' > /dev/null 2>&1
if test $? -ne 1 ; then
echo "Options: Wrong status code, test \#3 failed"
failures=1
fi
exit $failures

View File

@ -1,15 +0,0 @@
BEGIN {
FS = "@";
printf ("failures=0\n");
}
$0 !~ /^#/ && NF = 3 {
# printf ("status=`echo '%s'| { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2);
printf ("status=`echo '%s'| { ${GREP} -E -e '%s' >/dev/null 2>&1 ; echo $?; }`\n",$3, $2);
printf ("if test $status -ne %s ; then\n", $1);
printf ("\techo Spencer test \\#%d failed\n", ++n);
printf ("\tfailures=1\n");
printf ("fi\n");
}
END { printf ("exit $failures\n"); }

View File

@ -1,13 +0,0 @@
#!/bin/sh
# Regression test for GNU grep.
: ${srcdir=.}
failures=0
# . . . and the following by Henry Spencer.
${AWK-awk} -f $srcdir/spencer1.awk $srcdir/spencer1.tests > spencer1.script
sh spencer1.script && exit $failures
exit 1

View File

@ -1,122 +0,0 @@
0@abc@abc
1@abc@xbc
1@abc@axc
1@abc@abx
0@abc@xabcy
0@abc@ababc
0@ab*c@abc
0@ab*bc@abc
0@ab*bc@abbc
0@ab*bc@abbbbc
0@ab+bc@abbc
1@ab+bc@abc
1@ab+bc@abq
0@ab+bc@abbbbc
0@ab?bc@abbc
0@ab?bc@abc
1@ab?bc@abbbbc
0@ab?c@abc
0@^abc$@abc
1@^abc$@abcc
0@^abc@abcc
1@^abc$@aabc
0@abc$@aabc
0@^@abc
0@$@abc
0@a.c@abc
0@a.c@axc
0@a.*c@axyzc
1@a.*c@axyzd
1@a[bc]d@abc
0@a[bc]d@abd
1@a[b-d]e@abd
0@a[b-d]e@ace
0@a[b-d]@aac
0@a[-b]@a-
0@a[b-]@a-
1@a[b-a]@-
2@a[]b@-
2@a[@-
0@a]@a]
0@a[]]b@a]b
0@a[^bc]d@aed
1@a[^bc]d@abd
0@a[^-b]c@adc
1@a[^-b]c@a-c
1@a[^]b]c@a]c
0@a[^]b]c@adc
0@ab|cd@abc
0@ab|cd@abcd
0@()ef@def
0@()*@-
1@*a@-
0@^*@-
0@$*@-
1@(*)b@-
1@$b@b
2@a\@-
0@a\(b@a(b
0@a\(*b@ab
0@a\(*b@a((b
1@a\x@a\x
2@abc)@-
2@(abc@-
0@((a))@abc
0@(a)b(c)@abc
0@a+b+c@aabbabc
0@a**@-
0@a*?@-
0@(a*)*@-
0@(a*)+@-
0@(a|)*@-
0@(a*|b)*@-
0@(a+|b)*@ab
0@(a+|b)+@ab
0@(a+|b)?@ab
0@[^ab]*@cde
0@(^)*@-
0@(ab|)*@-
2@)(@-
1@abc@
1@abc@
0@a*@
0@([abc])*d@abbbcd
0@([abc])*bcd@abcd
0@a|b|c|d|e@e
0@(a|b|c|d|e)f@ef
0@((a*|b))*@-
0@abcd*efg@abcdefg
0@ab*@xabyabbbz
0@ab*@xayabbbz
0@(ab|cd)e@abcde
0@[abhgefdc]ij@hij
1@^(ab|cd)e@abcde
0@(abc|)ef@abcdef
0@(a|b)c*d@abcd
0@(ab|ab*)bc@abc
0@a([bc]*)c*@abc
0@a([bc]*)(c*d)@abcd
0@a([bc]+)(c*d)@abcd
0@a([bc]*)(c+d)@abcd
0@a[bcd]*dcdcde@adcdcde
1@a[bcd]+dcdcde@adcdcde
0@(ab|a)b*c@abc
0@((a)(b)c)(d)@abcd
0@[A-Za-z_][A-Za-z0-9_]*@alpha
0@^a(bc+|b[eh])g|.h$@abh
0@(bc+d$|ef*g.|h?i(j|k))@effgz
0@(bc+d$|ef*g.|h?i(j|k))@ij
1@(bc+d$|ef*g.|h?i(j|k))@effg
1@(bc+d$|ef*g.|h?i(j|k))@bcdd
0@(bc+d$|ef*g.|h?i(j|k))@reffgz
1@((((((((((a))))))))))@-
0@(((((((((a)))))))))@a
1@multiple words of text@uh-uh
0@multiple words@multiple words, yeah
0@(.*)c(.*)@abcde
1@\((.*),@(.*)\)
1@[k]@ab
0@abcd@abcd
0@a(bc)d@abcd
0@a[-]?c@ac
0@(....).*\1@beriberi

View File

@ -1,13 +0,0 @@
#!/bin/sh
# Regression test for GNU grep.
: ${srcdir=.}
failures=0
# . . . and the following by Henry Spencer.
${AWK-awk} -f $srcdir/scriptgen.awk $srcdir/spencer2.tests > tmp2.script
sh tmp2.script && exit $failures
exit 1

View File

@ -1,317 +0,0 @@
0@a@a
0@abc@abc
0@abc|de@abc
0@a|b|c@abc
0@a(b)c@abc
1@a\(b\)c@abc
2@a(@EPAREN
2@a(@a(
0@a\(@a(
1@a\(@EPAREN
1@a\(b@EPAREN
2@a(b@EPAREN
2@a(b@a(b
2@a)@a)
2@)@)
2@a)@a)
1@a\)@EPAREN
1@\)@EPAREN
0@a()b@ab
1@a\(\)b@ab
0@^abc$@abc
1@a^b@a^b
1@a^b@a^b
1@a$b@a$b
1@a$b@a$b
0@^@abc
0@$@abc
1@^$@""
1@$^@""
1@\($\)\(^\)@""
0@^^@""
0@$$@""
1@b$@abNc
1@b$@abNc
1@^b$@aNbNc
1@^b$@aNbNc
1@^$@aNNb
1@^$@abc
1@^$@abcN
1@$^@aNNb
1@\($\)\(^\)@aNNb
0@^^@aNNb
0@$$@aNNb
0@^a@a
0@a$@a
0@^a@aNb
1@^b@aNb
0@a$@bNa
1@b$@bNa
0@a*(^b$)c*@b
1@a*\(^b$\)c*@b
0@|@EMPTY
0@|@|
0@*@BADRPT
0@*@*
0@+@BADRPT
0@?@BADRPT
1@""@EMPTY
0@()@abc
1@\(\)@abc
0@a||b@EMPTY
0@|ab@EMPTY
0@ab|@EMPTY
1@(|a)b@EMPTY
1@(a|)b@EMPTY
1@(*a)@BADRPT
1@(+a)@BADRPT
1@(?a)@BADRPT
1@({1}a)@BADRPT
1@\(\{1\}a\)@BADRPT
1@(a|*b)@BADRPT
1@(a|+b)@BADRPT
1@(a|?b)@BADRPT
1@(a|{1}b)@BADRPT
0@^*@BADRPT
0@^*@*
0@^+@BADRPT
0@^?@BADRPT
0@^{1}@BADRPT
1@^\{1\}@BADRPT
0@a.c@abc
0@a[bc]d@abd
0@a\*c@a*c
1@ac@abc
1@a\bc@ac
1@\{@BADRPT
0@a\[b@a[b
2@a[b@EBRACK
0@a$@a
1@a$@a$
1@a\$@a
0@a\$@a$
1@a\$@a
1@a\$@a\$
2@a\(b\)\2c@ESUBREG
2@a\(b\1\)c@ESUBREG
2@a\(b*\)c\1d@abbcbd
2@a\(b*\)c\1d@abbcbbbd
2@^\(.\)\1@abc
2@a\(\([bc]\)\2\)*d@abbccd
2@a\(\([bc]\)\2\)*d@abbcbd
2@a\(\(b\)*\2\)*d@abbbd
2@\(a\)\1bcd@aabcd
2@\(a\)\1bc*d@aabcd
2@\(a\)\1bc*d@aabd
2@\(a\)\1bc*d@aabcccd
2@\(a\)\1bc*[ce]d@aabcccd
2@^\(a\)\1b\(c\)*cd$@aabcccd
0@ab*c@abc
0@ab+c@abc
0@ab?c@abc
1@a\(*\)b@a*b
1@a\(**\)b@ab
1@a\(***\)b@BADRPT
0@*a@*a
0@**a@a
1@***a@BADRPT
2@{@{
2@{abc@{abc
2@{1@BADRPT
0@{1}@BADRPT
2@a{b@a{b
0@a{1}b@ab
1@a\{1\}b@ab
0@a{1,}b@ab
1@a\{1,\}b@ab
0@a{1,2}b@aab
1@a\{1,2\}b@aab
2@a{1@EBRACE
1@a\{1@EBRACE
2@a{1a@EBRACE
1@a\{1a@EBRACE
2@a{1a}@BADBR
1@a\{1a\}@BADBR
0@a{,2}@a{,2}
1@a\{,2\}@BADBR
0@a{,}@a{,}
1@a\{,\}@BADBR
2@a{1,x}@BADBR
1@a\{1,x\}@BADBR
2@a{1,x@EBRACE
1@a\{1,x@EBRACE
1@a{300}@BADBR
1@a\{300\}@BADBR
1@a{1,0}@BADBR
1@a\{1,0\}@BADBR
0@ab{0,0}c@abcac
1@ab\{0,0\}c@abcac
0@ab{0,1}c@abcac
1@ab\{0,1\}c@abcac
0@ab{0,3}c@abbcac
1@ab\{0,3\}c@abbcac
0@ab{1,1}c@acabc
1@ab\{1,1\}c@acabc
0@ab{1,3}c@acabc
1@ab\{1,3\}c@acabc
0@ab{2,2}c@abcabbc
1@ab\{2,2\}c@abcabbc
0@ab{2,4}c@abcabbc
1@ab\{2,4\}c@abcabbc
0@a**@BADRPT
1@a++@BADRPT
0@a??@BADRPT
0@a*+@BADRPT
0@a*?@BADRPT
0@a+*@BADRPT
0@a+?@BADRPT
0@a?*@BADRPT
0@a?+@BADRPT
1@a{1}{1}@BADRPT
0@a*{1}@BADRPT
1@a+{1}@BADRPT
0@a?{1}@BADRPT
0@a{1}*@BADRPT
1@a{1}+@BADRPT
0@a{1}?@BADRPT
2@a*{b}@a{b}
1@a\{1\}\{1\}@BADRPT
1@a*\{1\}@BADRPT
1@a\{1\}*@BADRPT
0@a[b]c@abc
0@a[ab]c@abc
0@a[^ab]c@adc
0@a[]b]c@a]c
0@a[[b]c@a[c
0@a[-b]c@a-c
0@a[^]b]c@adc
0@a[^-b]c@adc
0@a[b-]c@a-c
2@a[b@EBRACK
2@a[]@EBRACK
0@a[1-3]c@a2c
1@a[3-1]c@ERANGE
1@a[1-3-5]c@ERANGE
1@a[[.-.]--]c@a-c
2@a[1-@ERANGE
2@a[[.@EBRACK
2@a[[.x@EBRACK
2@a[[.x.@EBRACK
1@a[[.x.]@EBRACK
1@a[[.x.]]@ax
1@a[[.x,.]]@ECOLLATE
1@a[[.one.]]b@a1b
1@a[[.notdef.]]b@ECOLLATE
1@a[[.].]]b@a]b
0@a[[:alpha:]]c@abc
2@a[[:notdef:]]c@ECTYPE
2@a[[:@EBRACK
2@a[[:alpha@EBRACK
2@a[[:alpha:]@EBRACK
2@a[[:alpha,:]@ECTYPE
2@a[[:]:]]b@ECTYPE
2@a[[:-:]]b@ECTYPE
2@a[[:alph:]]@ECTYPE
2@a[[:alphabet:]]@ECTYPE
1@[[:blank:]]+@aSSTb
1@[[:cntrl:]]+@aNTb
0@[[:digit:]]+@a019b
0@[[:graph:]]+@Sa%bS
0@[[:lower:]]+@AabC
0@[[:print:]]+@NaSbN
0@[[:punct:]]+@S%-&T
1@[[:space:]]+@aSNTb
0@[[:upper:]]+@aBCd
0@[[:xdigit:]]+@p0f3Cq
1@a[[=b=]]c@abc
2@a[[=@EBRACK
2@a[[=b@EBRACK
2@a[[=b=@EBRACK
1@a[[=b=]@EBRACK
1@a[[=b,=]]@ECOLLATE
1@a[[=one=]]b@a1b
0@a(((b)))c@abc
0@a(b|(c))d@abd
0@a(b*|c)d@abbd
0@a[ab]{20}@aaaaabaaaabaaaabaaaab
0@a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab]@aaaaabaaaabaaaabaaaab
0@a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night)@aaaaabaaaabaaaabaaaabweeknights
0@12345678901234567890123456789@a12345678901234567890123456789b
0@123456789012345678901234567890@a123456789012345678901234567890b
0@1234567890123456789012345678901@a1234567890123456789012345678901b
0@12345678901234567890123456789012@a12345678901234567890123456789012b
0@123456789012345678901234567890123@a123456789012345678901234567890123b
0@1234567890123456789012345678901234567890123456789012345678901234567890@a1234567890123456789012345678901234567890123456789012345678901234567890b
0@[ab][cd][ef][gh][ij][kl][mn]@xacegikmoq
0@[ab][cd][ef][gh][ij][kl][mn][op]@xacegikmoq
0@[ab][cd][ef][gh][ij][kl][mn][op][qr]@xacegikmoqy
0@[ab][cd][ef][gh][ij][kl][mn][op][q]@xacegikmoqy
0@abc@xabcy
2@a\(b\)?c\1d@acd
1@aBc@Abc
1@a[Bc]*d@abBCcd
1@0[[:upper:]]1@0a1
1@0[[:lower:]]1@0A1
1@a[^b]c@abc
0@a[^b]c@aBc
0@a[^b]c@adc
0@[a]b[c]@abc
0@[a]b[a]@aba
0@[abc]b[abc]@abc
0@[abc]b[abd]@abd
0@a(b?c)+d@accd
0@(wee|week)(knights|night)@weeknights
0@(we|wee|week|frob)(knights|night|day)@weeknights
0@a[bc]d@xyzaaabcaababdacd
0@a[ab]c@aaabc
0@abc@abc
0@a*@b
0@/\*.*\*/@/*x*/
0@/\*.*\*/@/*x*/y/*z*/
0@/\*([^*]|\*[^/])*\*/@/*x*/
0@/\*([^*]|\*[^/])*\*/@/*x*/y/*z*/
0@/\*([^*]|\*[^/])*\*/@/*x**/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x*/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x**/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x****/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x**x*/y/*z*/
0@/\*([^*]|\*+[^*/])*\*+/@/*x***x/y/*z*/
0@[abc]@a(b)c
0@[abc]@a(d)c
0@[abc]@a(bc)d
0@[abc]@a(dc)d
0@.@a()c
0@b.*c@b(bc)c
0@b.*@b(bc)c
0@.*c@b(bc)c
0@abc@abc
0@abc@xabcy
1@abc@xyz
0@a*b@aba*b
0@a*b@ab
1@""@EMPTY
1@aZb@a
1@aZb@a
0@aZb@(aZb)
0@aZ*b@(ab)
0@a.b@(aZb)
0@a.*@(aZb)c
2@[[:<:]]a@a
2@[[:<:]]a@ba
2@[[:<:]]a@-a
2@a[[:>:]]@a
2@a[[:>:]]@ab
2@a[[:>:]]@a-
2@[[:<:]]a.c[[:>:]]@axcd-dayc-dazce-abc
2@[[:<:]]a.c[[:>:]]@axcd-dayc-dazce-abc-q
2@[[:<:]]a.c[[:>:]]@axc-dayc-dazce-abc
2@[[:<:]]b.c[[:>:]]@a_bxc-byc_d-bzc-q
2@[[:<:]].x..[[:>:]]@y_xa_-_xb_y-_xc_-axdc
2@[[:<:]]a_b[[:>:]]@x_a_b
0@(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A])@A1
0@abcdefghijklmnop@abcdefghijklmnop
0@abcdefghijklmnopqrstuv@abcdefghijklmnopqrstuv
0@CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a@CC11
0@a?b@ab
1@-\{0,1\}[0-9]*$@-5

View File

@ -1,52 +0,0 @@
#!/bin/sh
# Test for status code for GNU grep.
# status code
# 0 match found
# 1 no match
# 2 file not found
: ${srcdir=.}
failures=0
# should return 0 found a match
echo "abcd" | ${GREP} -E -e 'abc' > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Status: Wrong status code, test \#1 failed"
failures=1
fi
# should return 1 found no match
echo "abcd" | ${GREP} -E -e 'zbc' > /dev/null 2>&1
if test $? -ne 1 ; then
echo "Status: Wrong status code, test \#2 failed"
failures=1
fi
# the filename MMMMMMMM.MMM should not exist hopefully
if test -r MMMMMMMM.MMM; then
echo "Please remove MMMMMMMM.MMM to run check"
else
# should return 2 file not found
${GREP} -E -e 'abc' MMMMMMMM.MMM > /dev/null 2>&1
if test $? -ne 2 ; then
echo "Status: Wrong status code, test \#3 failed"
failures=1
fi
# should return 2 file not found
${GREP} -E -s -e 'abc' MMMMMMMM.MMM > /dev/null 2>&1
if test $? -ne 2 ; then
echo "Status: Wrong status code, test \#4 failed"
failures=1
fi
# should return 0 found a match
echo "abcd" | ${GREP} -E -q -s 'abc' MMMMMMMM.MMM - > /dev/null 2>&1
if test $? -ne 0 ; then
echo "Status: Wrong status code, test \#5 failed"
failures=1
fi
fi
exit $failures

View File

@ -1,475 +0,0 @@
# regular expression test set
# Lines are at least three fields, separated by one or more tabs. "" stands
# for an empty field. First field is an RE. Second field is flags. If
# C flag given, regcomp() is expected to fail, and the third field is the
# error name (minus the leading REG_).
#
# Otherwise it is expected to succeed, and the third field is the string to
# try matching it against. If there is no fourth field, the match is
# expected to fail. If there is a fourth field, it is the substring that
# the RE is expected to match. If there is a fifth field, it is a comma-
# separated list of what the subexpressions should match, with - indicating
# no match for that one. In both the fourth and fifth fields, a (sub)field
# starting with @ indicates that the (sub)expression is expected to match
# a null string followed by the stuff after the @; this provides a way to
# test where null strings match. The character `N' in REs and strings
# is newline, `S' is space, `T' is tab, `Z' is NUL.
#
# The full list of flags:
# - placeholder, does nothing
# b RE is a BRE, not an ERE
# & try it as both an ERE and a BRE
# C regcomp() error expected, third field is error name
# i REG_ICASE
# m ("mundane") REG_NOSPEC
# s REG_NOSUB (not really testable)
# n REG_NEWLINE
# ^ REG_NOTBOL
# $ REG_NOTEOL
# # REG_STARTEND (see below)
# p REG_PEND
#
# For REG_STARTEND, the start/end offsets are those of the substring
# enclosed in ().
# basics
a & a a
abc & abc abc
abc|de - abc abc
a|b|c - abc a
# parentheses and perversions thereof
a(b)c - abc abc
a\(b\)c b abc abc
a( C EPAREN
a( b a( a(
a\( - a( a(
a\( bC EPAREN
a\(b bC EPAREN
a(b C EPAREN
a(b b a(b a(b
# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly)
a) - a) a)
) - ) )
# end gagging (in a just world, those *should* give EPAREN)
a) b a) a)
a\) bC EPAREN
\) bC EPAREN
a()b - ab ab
a\(\)b b ab ab
# anchoring and REG_NEWLINE
^abc$ & abc abc
a^b - a^b
a^b b a^b a^b
a$b - a$b
a$b b a$b a$b
^ & abc @abc
$ & abc @
^$ & "" @
$^ - "" @
\($\)\(^\) b "" @
# stop retching, those are legitimate (although disgusting)
^^ - "" @
$$ - "" @
##b$ & abNc
##b$ &n abNc b
##^b$ & aNbNc
##^b$ &n aNbNc b
##^$ &n aNNb @Nb
^$ n abc
##^$ n abcN @
##$^ n aNNb @Nb
##\($\)\(^\) bn aNNb @Nb
##^^ n^ aNNb @Nb
##$$ n aNNb @NN
^a ^ a
a$ $ a
##^a ^n aNb
##^b ^n aNb b
##a$ $n bNa
##b$ $n bNa b
a*(^b$)c* - b b
a*\(^b$\)c* b b b
# certain syntax errors and non-errors
| C EMPTY
| b | |
* C BADRPT
* b * *
+ C BADRPT
? C BADRPT
"" &C EMPTY
() - abc @abc
\(\) b abc @abc
a||b C EMPTY
|ab C EMPTY
ab| C EMPTY
(|a)b C EMPTY
(a|)b C EMPTY
(*a) C BADRPT
(+a) C BADRPT
(?a) C BADRPT
({1}a) C BADRPT
\(\{1\}a\) bC BADRPT
(a|*b) C BADRPT
(a|+b) C BADRPT
(a|?b) C BADRPT
(a|{1}b) C BADRPT
^* C BADRPT
^* b * *
^+ C BADRPT
^? C BADRPT
^{1} C BADRPT
^\{1\} bC BADRPT
# metacharacters, backslashes
a.c & abc abc
a[bc]d & abd abd
a\*c & a*c a*c
a\\b & a\b a\b
a\\\*b & a\*b a\*b
a\bc & abc abc
a\ &C EESCAPE
a\\bc & a\bc a\bc
\{ bC BADRPT
a\[b & a[b a[b
a[b &C EBRACK
# trailing $ is a peculiar special case for the BRE code
a$ & a a
a$ & a$
a\$ & a
a\$ & a$ a$
a\\$ & a
a\\$ & a$
a\\$ & a\$
a\\$ & a\ a\
# back references, ugh
##a\(b\)\2c bC ESUBREG
##a\(b\1\)c bC ESUBREG
a\(b*\)c\1d b abbcbbd abbcbbd bb
a\(b*\)c\1d b abbcbd
a\(b*\)c\1d b abbcbbbd
^\(.\)\1 b abc
a\([bc]\)\1d b abcdabbd abbd b
a\(\([bc]\)\2\)*d b abbccd abbccd
a\(\([bc]\)\2\)*d b abbcbd
# actually, this next one probably ought to fail, but the spec is unclear
a\(\(b\)*\2\)*d b abbbd abbbd
# here is a case that no NFA implementation does right
\(ab*\)[ab]*\1 b ababaaa ababaaa a
# check out normal matching in the presence of back refs
\(a\)\1bcd b aabcd aabcd
\(a\)\1bc*d b aabcd aabcd
\(a\)\1bc*d b aabd aabd
\(a\)\1bc*d b aabcccd aabcccd
\(a\)\1bc*[ce]d b aabcccd aabcccd
^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd
# ordinary repetitions
ab*c & abc abc
ab+c - abc abc
ab?c - abc abc
a\(*\)b b a*b a*b
a\(**\)b b ab ab
a\(***\)b bC BADRPT
*a b *a *a
**a b a a
***a bC BADRPT
# the dreaded bounded repetitions
{ & { {
{abc & {abc {abc
{1 C BADRPT
{1} C BADRPT
a{b & a{b a{b
a{1}b - ab ab
a\{1\}b b ab ab
a{1,}b - ab ab
a\{1,\}b b ab ab
a{1,2}b - aab aab
a\{1,2\}b b aab aab
a{1 C EBRACE
a\{1 bC EBRACE
a{1a C EBRACE
a\{1a bC EBRACE
a{1a} C BADBR
a\{1a\} bC BADBR
a{,2} - a{,2} a{,2}
a\{,2\} bC BADBR
a{,} - a{,} a{,}
a\{,\} bC BADBR
a{1,x} C BADBR
a\{1,x\} bC BADBR
a{1,x C EBRACE
a\{1,x bC EBRACE
a{300} C BADBR
a\{300\} bC BADBR
a{1,0} C BADBR
a\{1,0\} bC BADBR
ab{0,0}c - abcac ac
ab\{0,0\}c b abcac ac
ab{0,1}c - abcac abc
ab\{0,1\}c b abcac abc
ab{0,3}c - abbcac abbc
ab\{0,3\}c b abbcac abbc
ab{1,1}c - acabc abc
ab\{1,1\}c b acabc abc
ab{1,3}c - acabc abc
ab\{1,3\}c b acabc abc
ab{2,2}c - abcabbc abbc
ab\{2,2\}c b abcabbc abbc
ab{2,4}c - abcabbc abbc
ab\{2,4\}c b abcabbc abbc
((a{1,10}){1,10}){1,10} - a a a,a
# multiple repetitions
a** &C BADRPT
a++ C BADRPT
a?? C BADRPT
a*+ C BADRPT
a*? C BADRPT
a+* C BADRPT
a+? C BADRPT
a?* C BADRPT
a?+ C BADRPT
a{1}{1} C BADRPT
a*{1} C BADRPT
a+{1} C BADRPT
a?{1} C BADRPT
a{1}* C BADRPT
a{1}+ C BADRPT
a{1}? C BADRPT
a*{b} - a{b} a{b}
a\{1\}\{1\} bC BADRPT
a*\{1\} bC BADRPT
a\{1\}* bC BADRPT
# brackets, and numerous perversions thereof
a[b]c & abc abc
a[ab]c & abc abc
a[^ab]c & adc adc
a[]b]c & a]c a]c
a[[b]c & a[c a[c
a[-b]c & a-c a-c
a[^]b]c & adc adc
a[^-b]c & adc adc
a[b-]c & a-c a-c
a[b &C EBRACK
a[] &C EBRACK
a[1-3]c & a2c a2c
a[3-1]c &C ERANGE
a[1-3-5]c &C ERANGE
a[[.-.]--]c & a-c a-c
a[1- &C ERANGE
a[[. &C EBRACK
a[[.x &C EBRACK
a[[.x. &C EBRACK
a[[.x.] &C EBRACK
a[[.x.]] & ax ax
a[[.x,.]] &C ECOLLATE
a[[.one.]]b & a1b a1b
a[[.notdef.]]b &C ECOLLATE
a[[.].]]b & a]b a]b
a[[:alpha:]]c & abc abc
a[[:notdef:]]c &C ECTYPE
a[[: &C EBRACK
a[[:alpha &C EBRACK
a[[:alpha:] &C EBRACK
a[[:alpha,:] &C ECTYPE
a[[:]:]]b &C ECTYPE
a[[:-:]]b &C ECTYPE
a[[:alph:]] &C ECTYPE
a[[:alphabet:]] &C ECTYPE
##[[:alnum:]]+ - -%@a0X- a0X
##[[:alpha:]]+ - -%@aX0- aX
[[:blank:]]+ - aSSTb SST
##[[:cntrl:]]+ - aNTb NT
[[:digit:]]+ - a019b 019
##[[:graph:]]+ - Sa%bS a%b
[[:lower:]]+ - AabC ab
##[[:print:]]+ - NaSbN aSb
##[[:punct:]]+ - S%-&T %-&
[[:space:]]+ - aSNTb SNT
[[:upper:]]+ - aBCd BC
[[:xdigit:]]+ - p0f3Cq 0f3C
a[[=b=]]c & abc abc
a[[= &C EBRACK
a[[=b &C EBRACK
a[[=b= &C EBRACK
a[[=b=] &C EBRACK
a[[=b,=]] &C ECOLLATE
a[[=one=]]b & a1b a1b
# complexities
a(((b)))c - abc abc
a(b|(c))d - abd abd
a(b*|c)d - abbd abbd
# just gotta have one DFA-buster, of course
a[ab]{20} - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
# and an inline expansion in case somebody gets tricky
a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab] - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
# and in case somebody just slips in an NFA...
a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night) - aaaaabaaaabaaaabaaaabweeknights aaaaabaaaabaaaabaaaabweeknights
# fish for anomalies as the number of states passes 32
12345678901234567890123456789 - a12345678901234567890123456789b 12345678901234567890123456789
123456789012345678901234567890 - a123456789012345678901234567890b 123456789012345678901234567890
1234567890123456789012345678901 - a1234567890123456789012345678901b 1234567890123456789012345678901
12345678901234567890123456789012 - a12345678901234567890123456789012b 12345678901234567890123456789012
123456789012345678901234567890123 - a123456789012345678901234567890123b 123456789012345678901234567890123
# and one really big one, beyond any plausible word width
1234567890123456789012345678901234567890123456789012345678901234567890 - a1234567890123456789012345678901234567890123456789012345678901234567890b 1234567890123456789012345678901234567890123456789012345678901234567890
# fish for problems as brackets go past 8
[ab][cd][ef][gh][ij][kl][mn] - xacegikmoq acegikm
[ab][cd][ef][gh][ij][kl][mn][op] - xacegikmoq acegikmo
[ab][cd][ef][gh][ij][kl][mn][op][qr] - xacegikmoqy acegikmoq
[ab][cd][ef][gh][ij][kl][mn][op][q] - xacegikmoqy acegikmoq
# subtleties of matching
abc & xabcy abc
a\(b\)?c\1d b acd
aBc i Abc Abc
a[Bc]*d i abBCcd abBCcd
0[[:upper:]]1 &i 0a1 0a1
0[[:lower:]]1 &i 0A1 0A1
a[^b]c &i abc
a[^b]c &i aBc
a[^b]c &i adc adc
[a]b[c] - abc abc
[a]b[a] - aba aba
[abc]b[abc] - abc abc
[abc]b[abd] - abd abd
a(b?c)+d - accd accd
(wee|week)(knights|night) - weeknights weeknights
(we|wee|week|frob)(knights|night|day) - weeknights weeknights
a[bc]d - xyzaaabcaababdacd abd
a[ab]c - aaabc abc
abc s abc abc
a* & b @b
# Let's have some fun -- try to match a C comment.
# first the obvious, which looks okay at first glance...
/\*.*\*/ - /*x*/ /*x*/
# but...
/\*.*\*/ - /*x*/y/*z*/ /*x*/y/*z*/
# okay, we must not match */ inside; try to do that...
/\*([^*]|\*[^/])*\*/ - /*x*/ /*x*/
/\*([^*]|\*[^/])*\*/ - /*x*/y/*z*/ /*x*/
# but...
/\*([^*]|\*[^/])*\*/ - /*x**/y/*z*/ /*x**/y/*z*/
# and a still fancier version, which does it right (I think)...
/\*([^*]|\*+[^*/])*\*+/ - /*x*/ /*x*/
/\*([^*]|\*+[^*/])*\*+/ - /*x*/y/*z*/ /*x*/
/\*([^*]|\*+[^*/])*\*+/ - /*x**/y/*z*/ /*x**/
/\*([^*]|\*+[^*/])*\*+/ - /*x****/y/*z*/ /*x****/
/\*([^*]|\*+[^*/])*\*+/ - /*x**x*/y/*z*/ /*x**x*/
/\*([^*]|\*+[^*/])*\*+/ - /*x***x/y/*z*/ /*x***x/y/*z*/
# subexpressions
a(b)(c)d - abcd abcd b,c
a(((b)))c - abc abc b,b,b
a(b|(c))d - abd abd b,-
a(b*|c|e)d - abbd abbd bb
a(b*|c|e)d - acd acd c
a(b*|c|e)d - ad ad @d
a(b?)c - abc abc b
a(b?)c - ac ac @c
a(b+)c - abc abc b
a(b+)c - abbbc abbbc bbb
a(b*)c - ac ac @c
(a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de
# the regression tester only asks for 9 subexpressions
a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j
a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l - abcdefghijkl abcdefghijkl b,c,d,e,f,g,h,i,j,k
a([bc]?)c - abc abc b
a([bc]?)c - ac ac @c
a([bc]+)c - abc abc b
a([bc]+)c - abcc abcc bc
a([bc]+)bc - abcbc abcbc bc
a(bb+|b)b - abb abb b
a(bbb+|bb+|b)b - abb abb b
a(bbb+|bb+|b)b - abbb abbb bb
a(bbb+|bb+|b)bb - abbb abbb b
(.*).* - abcdef abcdef abcdef
##(a*)* - bc @b @b
# do we get the right subexpression when it is used more than once?
a(b|c)*d - ad ad -
a(b|c)*d - abcd abcd c
a(b|c)+d - abd abd b
a(b|c)+d - abcd abcd c
a(b|c?)+d - ad ad @d
a(b|c?)+d - abcd abcd @d
a(b|c){0,0}d - ad ad -
a(b|c){0,1}d - ad ad -
a(b|c){0,1}d - abd abd b
a(b|c){0,2}d - ad ad -
a(b|c){0,2}d - abcd abcd c
a(b|c){0,}d - ad ad -
a(b|c){0,}d - abcd abcd c
a(b|c){1,1}d - abd abd b
a(b|c){1,1}d - acd acd c
a(b|c){1,2}d - abd abd b
a(b|c){1,2}d - abcd abcd c
a(b|c){1,}d - abd abd b
a(b|c){1,}d - abcd abcd c
a(b|c){2,2}d - acbd acbd b
a(b|c){2,2}d - abcd abcd c
a(b|c){2,4}d - abcd abcd c
a(b|c){2,4}d - abcbd abcbd b
a(b|c){2,4}d - abcbcd abcbcd c
a(b|c){2,}d - abcd abcd c
a(b|c){2,}d - abcbd abcbd b
##a(b+|((c)*))+d - abd abd @d,@d,-
##a(b+|((c)*))+d - abcd abcd @d,@d,-
# check out the STARTEND option
[abc] &# a(b)c b
[abc] &# a(d)c
[abc] &# a(bc)d b
[abc] &# a(dc)d c
. &# a()c
b.*c &# b(bc)c bc
b.* &# b(bc)c bc
.*c &# b(bc)c bc
# plain strings, with the NOSPEC flag
abc m abc abc
abc m xabcy abc
abc m xyz
a*b m aba*b a*b
a*b m ab
"" mC EMPTY
# cases involving NULs
aZb & a a
aZb &p a
#aZb &p# (aZb) aZb
aZ*b &p# (ab) ab
#a.b &# (aZb) aZb
#a.* &# (aZb)c aZb
# word boundaries (ick)
[[:<:]]a & a a
[[:<:]]a & ba
[[:<:]]a & -a a
a[[:>:]] & a a
a[[:>:]] & ab
a[[:>:]] & a- a
[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc
[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc
[[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc
[[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc
[[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_
[[:<:]]a_b[[:>:]] & x_a_b
# past problems, and suspected problems
(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1
abcdefghijklmnop i abcdefghijklmnop abcdefghijklmnop
abcdefghijklmnopqrstuv i abcdefghijklmnopqrstuv abcdefghijklmnopqrstuv
(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN]) - CC11 CC11
CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11
Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz
a?b - ab ab
-\{0,1\}[0-9]*$ b -5 -5

View File

@ -1,19 +0,0 @@
#!/bin/sh
#
# Tell them not to be alarmed.
: ${srcdir=.}
failures=0
#
cat <<\EOF
Please, do not be alarmed if some of the tests failed.
Report them to <bug-gnu-utils@gnu.org>,
with the line number, the name of the file,
and grep version number 'grep --version'.
Make sure you have the word grep in the subject.
Thank You.
EOF