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: extend test for unresolved var...



details:   https://anonhg.NetBSD.org/src/rev/fff4358304e4
branches:  trunk
changeset: 938185:fff4358304e4
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Sep 03 19:10:56 2020 +0000

description:
make: extend test for unresolved variables in dependencies

This is to ensure that the upcoming refactoring of Var_Parse in
SuffExpandChildren does not break anything.

diffstat:

 usr.bin/make/unit-tests/dep-var.exp |  1 +
 usr.bin/make/unit-tests/dep-var.mk  |  6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 1de8a41c8a65 -r fff4358304e4 usr.bin/make/unit-tests/dep-var.exp
--- a/usr.bin/make/unit-tests/dep-var.exp       Thu Sep 03 18:59:33 2020 +0000
+++ b/usr.bin/make/unit-tests/dep-var.exp       Thu Sep 03 19:10:56 2020 +0000
@@ -1,2 +1,3 @@
 def2
+a-def2-b
 exit status 0
diff -r 1de8a41c8a65 -r fff4358304e4 usr.bin/make/unit-tests/dep-var.mk
--- a/usr.bin/make/unit-tests/dep-var.mk        Thu Sep 03 18:59:33 2020 +0000
+++ b/usr.bin/make/unit-tests/dep-var.mk        Thu Sep 03 19:10:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dep-var.mk,v 1.1 2020/08/22 16:51:26 rillig Exp $
+# $NetBSD: dep-var.mk,v 1.2 2020/09/03 19:10:56 rillig Exp $
 #
 # Tests for variable references in dependency declarations.
 #
@@ -17,7 +17,7 @@
 #
 # At the point where the expression ${DEF2} is expanded, the variable DEF2
 # is defined, so everything's fine.
-all: $${DEF2}
+all: $${DEF2} a-$${DEF2}-b
 
 # This variable is not defined at all.
 # XXX: The -dv log says:
@@ -29,5 +29,5 @@
 UNDEF1=        undef1
 DEF2=  def2
 
-undef1 def2:
+undef1 def2 a-def2-b:
        @echo ${.TARGET}



Home | Main Index | Thread Index | Old Index