svn commit: r224248 - user/gabor/tre-integration/tools/test/regex

Gabor Kovesdan gabor at FreeBSD.org
Thu Jul 21 19:06:52 UTC 2011


Author: gabor
Date: Thu Jul 21 19:06:51 2011
New Revision: 224248
URL: http://svn.freebsd.org/changeset/base/224248

Log:
  - Add -s flag to cut to be more safe with comment lines

Modified:
  user/gabor/tre-integration/tools/test/regex/Makefile

Modified: user/gabor/tre-integration/tools/test/regex/Makefile
==============================================================================
--- user/gabor/tre-integration/tools/test/regex/Makefile	Thu Jul 21 17:20:44 2011	(r224247)
+++ user/gabor/tre-integration/tools/test/regex/Makefile	Thu Jul 21 19:06:51 2011	(r224248)
@@ -10,9 +10,9 @@ test: regmatch
 	@echo "=== Running test ${t} ==="
 	@flags=`grep '# *FLAGS' tests/${t} | sed 's|# *FLAGS *||g'`; \
 	for l in `cat tests/${t} | grep -ve '^#'`; do \
-		str=`echo $${l} | cut -d \; -f 2`; \
-		pat=`echo $${l} | cut -d \; -f 1`; \
-		match=`echo $${l} | cut -d \; -f 3`; \
+		str=`echo $${l} | cut -d \; -s -f 2`; \
+		pat=`echo $${l} | cut -d \; -s -f 1`; \
+		match=`echo $${l} | cut -d \; -s -f 3`; \
 		result=`env LC_ALL=C REGTEST_FLAGS=$${flags} ./regmatch/regmatch $${pat} $${str}`; \
 		if [ "$${match}" != "$${result}" ]; then \
 			echo "Failed matching pattern $${pat} to string $${str}"; \


More information about the svn-src-user mailing list