Module Name:    src
Committed By:   rillig
Date:           Fri Oct 30 13:41:14 UTC 2020

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

Log Message:
make(1): add test for two variable expressions in a string literal


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/cond-cmp-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-cmp-string.mk
diff -u src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.7 src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.8
--- src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.7	Fri Oct 30 08:13:17 2020
+++ src/usr.bin/make/unit-tests/cond-cmp-string.mk	Fri Oct 30 13:41:14 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-string.mk,v 1.7 2020/10/30 08:13:17 rillig Exp $
+# $NetBSD: cond-cmp-string.mk,v 1.8 2020/10/30 13:41:14 rillig Exp $
 #
 # Tests for string comparisons in .if conditions.
 
@@ -57,8 +57,8 @@
 .  error
 .endif
 
-# XXX: As of 2020-10-30, adding a space to the string results in a parse
-# error.  This is a bug and should have been caught much earlier.
+# XXX: As of 2020-10-30, adding literal characters to the string results
+# in a parse error.  This is a bug and should have been caught much earlier.
 # I wonder since when it exists.
 .if ${:Uword} != "${:Uword} "
 .  error
@@ -66,6 +66,11 @@
 .  error
 .endif
 
+# Adding another variable expression to the string literal works though.
+.if ${:Uword} != "${:Uwo}${:Urd}"
+.  error
+.endif
+
 # Adding a space at the beginning of the quoted variable expression works
 # though.
 .if ${:U word } != " ${:Uword} "

Reply via email to