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): add tests for maximum numbe...



details:   https://anonhg.NetBSD.org/src/rev/4bae940b1f02
branches:  trunk
changeset: 936135:4bae940b1f02
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jul 19 19:36:20 2020 +0000

description:
make(1): add tests for maximum number of capturing groups in :C

diffstat:

 usr.bin/make/unit-tests/modmisc.exp |  1 +
 usr.bin/make/unit-tests/modmisc.mk  |  5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 547824673d4c -r 4bae940b1f02 usr.bin/make/unit-tests/modmisc.exp
--- a/usr.bin/make/unit-tests/modmisc.exp       Sun Jul 19 19:27:08 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.exp       Sun Jul 19 19:36:20 2020 +0000
@@ -69,4 +69,5 @@
 make: No subexpression \2
 mod-C-limits:22-missing:1 6
 mod-C-limits:22-ok:1 33 556
+mod-C-limits:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest
 exit status 0
diff -r 547824673d4c -r 4bae940b1f02 usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk        Sun Jul 19 19:27:08 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk        Sun Jul 19 19:36:20 2020 +0000
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.14 2020/07/19 17:24:22 rillig Exp $
+# $Id: modmisc.mk,v 1.15 2020/07/19 19:36:20 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -142,3 +142,6 @@
        @echo $@:22-missing:${:U1 23 456:C,..,\2\2,:Q}
        @echo $@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}
        @echo $@:22-ok:${:U1 23 456:C,(.)(.),\2\2,:Q}
+       # The :C modifier only handles single-digit capturing groups,
+       # which is more than enough for daily use.
+       @echo $@:capture:${:UabcdefghijABCDEFGHIJrest:C,(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.),\9\8\7\6\5\4\3\2\1\0\10\11\12,}



Home | Main Index | Thread Index | Old Index