Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): improve test for undefined ...
details: https://anonhg.NetBSD.org/src/rev/998b8c5a19df
branches: trunk
changeset: 936961:998b8c5a19df
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 09 15:15:29 2020 +0000
description:
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.
diffstat:
usr.bin/make/unit-tests/moderrs.exp | 2 +-
usr.bin/make/unit-tests/moderrs.mk | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r b1b61352a272 -r 998b8c5a19df usr.bin/make/unit-tests/moderrs.exp
--- a/usr.bin/make/unit-tests/moderrs.exp Sun Aug 09 15:07:13 2020 +0000
+++ b/usr.bin/make/unit-tests/moderrs.exp Sun Aug 09 15:15:29 2020 +0000
@@ -96,7 +96,7 @@
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
diff -r b1b61352a272 -r 998b8c5a19df usr.bin/make/unit-tests/moderrs.mk
--- a/usr.bin/make/unit-tests/moderrs.mk Sun Aug 09 15:07:13 2020 +0000
+++ b/usr.bin/make/unit-tests/moderrs.mk Sun Aug 09 15:15:29 2020 +0000
@@ -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-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 $@:
Home |
Main Index |
Thread Index |
Old Index