Module Name:    src
Committed By:   rillig
Date:           Sun Nov  8 23:00:10 UTC 2020

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

Log Message:
make(1): add test for comparing numbers with strings


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.12
--- src/usr.bin/make/unit-tests/cond-cmp-string.mk:1.11	Fri Oct 30 14:53:31 2020
+++ src/usr.bin/make/unit-tests/cond-cmp-string.mk	Sun Nov  8 23:00:09 2020
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-string.mk,v 1.11 2020/10/30 14:53:31 rillig Exp $
+# $NetBSD: cond-cmp-string.mk,v 1.12 2020/11/08 23:00:09 rillig Exp $
 #
 # Tests for string comparisons in .if conditions.
 
@@ -88,3 +88,16 @@
 .if ${:U word } != " ${:Uword} "
 .  error
 .endif
+
+# If at least one side of the comparison is a string literal, the string
+# comparison is performed.
+.if 12345 != "12345"
+.  error
+.endif
+
+# If at least one side of the comparison is a string literal, the string
+# comparison is performed.  The ".0" in the left-hand side makes the two
+# sides of the equation unequal.
+.if 12345.0 == "12345"
+.  error
+.endif

Reply via email to