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 tests/make: extend tests for the ':=...
details: https://anonhg.NetBSD.org/src/rev/ccc4ab65dacf
branches: trunk
changeset: 369932:ccc4ab65dacf
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Sep 08 20:23:45 2022 +0000
description:
tests/make: extend tests for the ':=' assignment operator
diffstat:
usr.bin/make/unit-tests/var-op-expand.exp | 8 ++++----
usr.bin/make/unit-tests/var-op-expand.mk | 13 +++++++++++--
2 files changed, 15 insertions(+), 6 deletions(-)
diffs (63 lines):
diff -r 838f208b7a33 -r ccc4ab65dacf usr.bin/make/unit-tests/var-op-expand.exp
--- a/usr.bin/make/unit-tests/var-op-expand.exp Thu Sep 08 20:22:55 2022 +0000
+++ b/usr.bin/make/unit-tests/var-op-expand.exp Thu Sep 08 20:23:45 2022 +0000
@@ -1,7 +1,7 @@
-make: "var-op-expand.mk" line 265: Unknown modifier "s,value,replaced,"
-make: "var-op-expand.mk" line 268: warning: XXX Neither branch should be taken.
-make: "var-op-expand.mk" line 273: Unknown modifier "s,value,replaced,"
-make: "var-op-expand.mk" line 274: warning: XXX Neither branch should be taken.
+make: "var-op-expand.mk" line 274: Unknown modifier "s,value,replaced,"
+make: "var-op-expand.mk" line 277: warning: XXX Neither branch should be taken.
+make: "var-op-expand.mk" line 282: Unknown modifier "s,value,replaced,"
+make: "var-op-expand.mk" line 283: warning: XXX Neither branch should be taken.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 838f208b7a33 -r ccc4ab65dacf usr.bin/make/unit-tests/var-op-expand.mk
--- a/usr.bin/make/unit-tests/var-op-expand.mk Thu Sep 08 20:22:55 2022 +0000
+++ b/usr.bin/make/unit-tests/var-op-expand.mk Thu Sep 08 20:23:45 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: var-op-expand.mk,v 1.16 2021/12/28 10:47:00 rillig Exp $
+# $NetBSD: var-op-expand.mk,v 1.17 2022/09/08 20:23:45 rillig Exp $
#
# Tests for the := variable assignment operator, which expands its
# right-hand side.
@@ -37,7 +37,7 @@
.endif
-# reference to a variable containing a literal dollar sign
+# reference to a variable containing literal dollar signs
REF= $$ $$$$ $$$$$$$$
VAR:= ${REF}
REF= too late
@@ -49,6 +49,9 @@
# reference to an undefined variable
.undef UNDEF
VAR:= <${UNDEF}>
+.if ${VAR} != "<>"
+. error
+.endif
UNDEF= after
.if ${VAR} != "<after>"
. error
@@ -68,6 +71,9 @@
# expression with an indirect modifier referring to an undefined variable
.undef UNDEF
VAR:= ${:${UNDEF}}
+.if ${VAR} != ""
+. error
+.endif
UNDEF= Uwas undefined
.if ${VAR} != "was undefined"
. error
@@ -99,6 +105,9 @@
REF2= <${REF3}>
REF= ${REF2}
VAR:= ${REF}
+.if ${VAR} != "<>"
+. error
+.endif
REF3= too late
.if ${VAR} != "<too late>"
. error
Home |
Main Index |
Thread Index |
Old Index