]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - gnu/usr.bin/grep/tests/bre.awk
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / gnu / usr.bin / grep / tests / bre.awk
1 BEGIN {
2         FS="@";
3         n = 0;
4         printf ("# Generated Spencer BRE Test\n");
5         printf ("failures=0\n");
6 }
7
8 $0 ~ /^#/  { next; }
9
10 NF == 3 {
11 #       printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2);
12         printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $? ; }`\n",$3, $2);
13         printf ("if test $status -ne %s ; then\n", $1);
14         printf ("\techo Spencer bre test \\#%d failed\n", ++n);
15         printf ("\tfailures=1\n");
16         printf ("fi\n");
17 }
18
19 NF == 4 {
20 #don't alarm users
21 #       printf ("echo '%s' | ${GREP} -e '%s' > /dev/null 2>&1\n",$3, $2);
22 #       printf ("if test $? -ne %s ; then\n", $1);
23 #       printf ("\techo Expected non conformance \\#%d ... continuing\n", ++n);
24 #       printf ("fi\n");
25 }
26
27 END { printf ("exit $failures\n"); }