Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2011 19:06:52 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r224248 - user/gabor/tre-integration/tools/test/regex
Message-ID:  <201107211906.p6LJ6qAR081941@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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}"; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107211906.p6LJ6qAR081941>