Module Name:    src
Committed By:   rillig
Date:           Sun May  8 06:57:00 UTC 2022

Modified Files:
        src/usr.bin/make/unit-tests: cond-token-string.exp cond-token-string.mk

Log Message:
tests/make: fix typo in variable name


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/cond-token-string.exp
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/cond-token-string.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/cond-token-string.exp
diff -u src/usr.bin/make/unit-tests/cond-token-string.exp:1.8 src/usr.bin/make/unit-tests/cond-token-string.exp:1.9
--- src/usr.bin/make/unit-tests/cond-token-string.exp:1.8	Sun May  8 06:51:27 2022
+++ src/usr.bin/make/unit-tests/cond-token-string.exp	Sun May  8 06:57:00 2022
@@ -13,8 +13,7 @@ CondParser_Eval: "${:Uvalue}"
 make: "cond-token-string.mk" line 68: A nonempty variable expression evaluates to true.
 CondParser_Eval: "${:U}"
 make: "cond-token-string.mk" line 76: An empty variable evaluates to false.
-CondParser_Eval: ("${VALUE}")
-make: "cond-token-string.mk" line 84: Missing argument for ".error"
+CondParser_Eval: ("${VAR}")
 CondParser_Eval: "quoted" == quoted
 Comparing "quoted" == "quoted"
 make: Fatal errors encountered -- cannot continue

Index: src/usr.bin/make/unit-tests/cond-token-string.mk
diff -u src/usr.bin/make/unit-tests/cond-token-string.mk:1.5 src/usr.bin/make/unit-tests/cond-token-string.mk:1.6
--- src/usr.bin/make/unit-tests/cond-token-string.mk:1.5	Sun May  8 06:51:27 2022
+++ src/usr.bin/make/unit-tests/cond-token-string.mk	Sun May  8 06:57:00 2022
@@ -1,4 +1,4 @@
-# $NetBSD: cond-token-string.mk,v 1.5 2022/05/08 06:51:27 rillig Exp $
+# $NetBSD: cond-token-string.mk,v 1.6 2022/05/08 06:57:00 rillig Exp $
 #
 # Tests for quoted string literals in .if conditions.
 #
@@ -77,9 +77,11 @@
 .endif
 
 # A non-empty string evaluates to true, no matter if it's a literal string or
-# if it contains variable expressions.
+# if it contains variable expressions.  The parentheses are not necessary for
+# the parser, in this case their only purpose is to make the code harder to
+# read for humans.
 VAR=	value
-.if ("${VALUE}")
+.if ("${VAR}")
 .else
 .  error
 .endif

Reply via email to