svn commit: r368371 - in head/contrib/netbsd-tests/lib/libc/regex: . data

Kyle Evans kevans at FreeBSD.org
Sat Dec 5 14:38:47 UTC 2020


Author: kevans
Date: Sat Dec  5 14:38:46 2020
New Revision: 368371
URL: https://svnweb.freebsd.org/changeset/base/368371

Log:
  libc: regex: partial revert of r368358
  
  Part of the libregex functionality leaked into the tests it shares with
  the standard regex(3). Introduce a P flag to set the REG_POSIX cflag to
  indicate that libc regex should effectively do nothing while libregex should
  specifically run it in non-extended mode.
  
  This unbreaks the libc/regex test run.
  
  Reported by:	Jenkins

Modified:
  head/contrib/netbsd-tests/lib/libc/regex/README
  head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
  head/contrib/netbsd-tests/lib/libc/regex/main.c

Modified: head/contrib/netbsd-tests/lib/libc/regex/README
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/README	Sat Dec  5 14:06:01 2020	(r368370)
+++ head/contrib/netbsd-tests/lib/libc/regex/README	Sat Dec  5 14:38:46 2020	(r368371)
@@ -28,6 +28,7 @@ The full list of flags:
   $	REG_NOTEOL
   #	REG_STARTEND (see below)
   p	REG_PEND
+  P	REG_POSIX
 
 For REG_STARTEND, the start/end offsets are those of the substring
 enclosed in ().

Modified: head/contrib/netbsd-tests/lib/libc/regex/data/meta.in
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/data/meta.in	Sat Dec  5 14:06:01 2020	(r368370)
+++ head/contrib/netbsd-tests/lib/libc/regex/data/meta.in	Sat Dec  5 14:38:46 2020	(r368371)
@@ -5,7 +5,7 @@ a\*c		&	a*c	a*c
 a\\b		&	a\b	a\b
 a\\\*b		&	a\*b	a\*b
 # Begin FreeBSD
-a\bc		&	abc
+a\bc		&CP	EESCAPE
 # End FreeBSD
 a\		&C	EESCAPE
 a\\bc		&	a\bc	a\bc

Modified: head/contrib/netbsd-tests/lib/libc/regex/main.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/regex/main.c	Sat Dec  5 14:06:01 2020	(r368370)
+++ head/contrib/netbsd-tests/lib/libc/regex/main.c	Sat Dec  5 14:38:46 2020	(r368371)
@@ -338,7 +338,7 @@ options(int type, char *s)
 {
 	char *p;
 	int o = (type == 'c') ? copts : eopts;
-	const char *legal = (type == 'c') ? "bisnmp" : "^$#tl";
+	const char *legal = (type == 'c') ? "bisnmpP" : "^$#tl";
 
 	for (p = s; *p != '\0'; p++)
 		if (strchr(legal, *p) != NULL)
@@ -361,6 +361,9 @@ options(int type, char *s)
 				break;
 			case 'p':
 				o |= REG_PEND;
+				break;
+			case 'P':
+				o |= REG_POSIX;
 				break;
 			case '^':
 				o |= REG_NOTBOL;


More information about the svn-src-all mailing list