Module Name: src
Committed By: rillig
Date: Sun Aug 9 15:15:29 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: moderrs.exp moderrs.mk
Log Message:
make(1): improve test for undefined subexpression in :C modifier
In the previous test output, it was unnecessarily hard to see what
happens because of the many empty strings. Enclosing the capturing
groups in parentheses helps against this.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/moderrs.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/moderrs.exp
diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.14 src/usr.bin/make/unit-tests/moderrs.exp:1.15
--- src/usr.bin/make/unit-tests/moderrs.exp:1.14 Sun Aug 9 15:03:25 2020
+++ src/usr.bin/make/unit-tests/moderrs.exp Sun Aug 9 15:15:29 2020
@@ -96,7 +96,7 @@ make: No match for subexpression \2
make: No match for subexpression \1
make: No match for subexpression \2
make: No match for subexpression \1
-+ + + 3 5 8 3+ +1 34
+()+() ()+() ()+() 3 5 8 (3)+() ()+(1) 34
mod-ts-parse:
112358132134
15152535558513521534
Index: src/usr.bin/make/unit-tests/moderrs.mk
diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.13 src/usr.bin/make/unit-tests/moderrs.mk:1.14
--- src/usr.bin/make/unit-tests/moderrs.mk:1.13 Sun Aug 9 15:03:25 2020
+++ src/usr.bin/make/unit-tests/moderrs.mk Sun Aug 9 15:15:29 2020
@@ -1,4 +1,4 @@
-# $Id: moderrs.mk,v 1.13 2020/08/09 15:03:25 rillig Exp $
+# $Id: moderrs.mk,v 1.14 2020/08/09 15:15:29 rillig Exp $
#
# various modifier error tests
@@ -140,7 +140,7 @@ mod-regex-delimiter:
mod-regex-undefined-subexpression:
@echo $@:
@echo ${FIB:C,1(.*),one\1,} # all ok
- @echo ${FIB:C,1(.*)|2(.*),\1+\2,} # no match for subexpression
+ @echo ${FIB:C,1(.*)|2(.*),(\1)+(\2),:Q} # no match for subexpression
mod-ts-parse:
@echo $@: