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 test for debugging mess...
details: https://anonhg.NetBSD.org/src/rev/d9681ebfb18f
branches: trunk
changeset: 937058:d9681ebfb18f
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 08 12:22:10 2020 +0000
description:
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.
diffstat:
usr.bin/make/unit-tests/vardebug.exp | 15 +++++++++++++++
usr.bin/make/unit-tests/vardebug.mk | 6 +++++-
2 files changed, 20 insertions(+), 1 deletions(-)
diffs (45 lines):
diff -r fb82c935070a -r d9681ebfb18f usr.bin/make/unit-tests/vardebug.exp
--- a/usr.bin/make/unit-tests/vardebug.exp Sat Aug 08 11:44:55 2020 +0000
+++ b/usr.bin/make/unit-tests/vardebug.exp Sat Aug 08 12:22:10 2020 +0000
@@ -40,6 +40,21 @@
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
diff -r fb82c935070a -r d9681ebfb18f usr.bin/make/unit-tests/vardebug.mk
--- a/usr.bin/make/unit-tests/vardebug.mk Sat Aug 08 11:44:55 2020 +0000
+++ b/usr.bin/make/unit-tests/vardebug.mk Sat Aug 08 12:22:10 2020 +0000
@@ -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 @@
.if ${VAR:tu:tl:Q} # ApplyModifiers
.endif
+# ApplyModifiers, "Got ..."
+.if ${:Uvalue:${:UM*e}:Mvalu[e]}
+.endif
+
.undef ${:UVAR} # Var_Delete
RELEVANT= no
Home |
Main Index |
Thread Index |
Old Index