Module Name:    src
Committed By:   rillig
Date:           Sat Aug  8 12:22:10 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: vardebug.exp vardebug.mk

Log Message:
make(1): add test for debugging message for indirect modifiers

The current output format stops in the middle of the next modifier,
which was probably not intended.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/vardebug.exp \
    src/usr.bin/make/unit-tests/vardebug.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/vardebug.exp
diff -u src/usr.bin/make/unit-tests/vardebug.exp:1.1 src/usr.bin/make/unit-tests/vardebug.exp:1.2
--- src/usr.bin/make/unit-tests/vardebug.exp:1.1	Sat Jul 25 21:19:29 2020
+++ src/usr.bin/make/unit-tests/vardebug.exp	Sat Aug  8 12:22:10 2020
@@ -40,6 +40,21 @@ Applying[VAR] :Q to "1 2 3"
 QuoteMeta: [1\ 2\ 3]
 Result[VAR] of :Q is "1\ 2\ 3"
 Applying[] :U to ""
+Result[] of :U is "value"
+Applying[] :U to ""
+Result[] of :U is "M*e"
+Got 'M*e' from '${:UM*e}':Mvalu[e
+Applying[] :M to "value"
+Pattern[] for [value] is [*e]
+ModifyWords: split "value" into 1 words
+VarMatch [value] [*e]
+Result[] of :M is "value"
+Applying[] :M to "value"
+Pattern[] for [value] is [valu[e]]
+ModifyWords: split "value" into 1 words
+VarMatch [value] [valu[e]]
+Result[] of :M is "value"
+Applying[] :U to ""
 Result[] of :U is "VAR"
 Global:delete VAR
 Global:RELEVANT = no
Index: src/usr.bin/make/unit-tests/vardebug.mk
diff -u src/usr.bin/make/unit-tests/vardebug.mk:1.1 src/usr.bin/make/unit-tests/vardebug.mk:1.2
--- src/usr.bin/make/unit-tests/vardebug.mk:1.1	Sat Jul 25 21:19:29 2020
+++ src/usr.bin/make/unit-tests/vardebug.mk	Sat Aug  8 12:22:10 2020
@@ -1,4 +1,4 @@
-# $NetBSD: vardebug.mk,v 1.1 2020/07/25 21:19:29 rillig Exp $
+# $NetBSD: vardebug.mk,v 1.2 2020/08/08 12:22:10 rillig Exp $
 #
 # Demonstrates the debugging output for var.c.
 
@@ -33,6 +33,10 @@ VAR+=		3
 .if ${VAR:tu:tl:Q}		# ApplyModifiers
 .endif
 
+# ApplyModifiers, "Got ..."
+.if ${:Uvalue:${:UM*e}:Mvalu[e]}
+.endif
+
 .undef ${:UVAR}			# Var_Delete
 
 RELEVANT=	no

Reply via email to