VirtualBox

source: kBuild/vendor/grep/2.12/tests/ere.awk@ 2595

Last change on this file since 2595 was 2595, checked in by bird, 12 years ago

gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)

File size: 1.1 KB
Line 
1# Copyright (C) 2001, 2006, 2009-2012 Free Software Foundation, Inc.
2#
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
6
7BEGIN {
8 FS="@";
9 n = 0;
10 printf ("# Generated Spencer ERE Test\n");
11 printf ("failures=0\n");
12}
13
14$0 ~ /^#/ { next; }
15
16NF == 3 {
17# printf ("status=$(echo '%s' | { grep -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; })\n",$3, $2);
18 printf ("status=$(echo '%s' | { grep -E -e '%s' > /dev/null 2>&1; echo $?; })\n",$3, $2);
19 printf ("if test $status -ne %s ; then\n", $1);
20 printf ("\techo Spencer ere test \\#%d failed\n", ++n);
21 printf ("\tfailures=1\n");
22 printf ("fi\n");
23}
24
25NF == 4 {
26# don't alarm the user for now
27# printf ("echo '%s'|grep -E -e '%s' > /dev/null 2>&1\n",$3, $2);
28# printf ("if test $? -ne %s ; then\n", $1);
29# printf ("\techo Expected non conformance \\#%d ... continuing\n", ++n);
30# printf ("fi\n");
31}
32
33NF == 5 {
34# don't alarm the user for now
35 next;
36}
37
38END { printf ("exit $failures\n"); }
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette