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(1): fix tests about nonexistent...
details: https://anonhg.NetBSD.org/src/rev/96064e2069ea
branches: trunk
changeset: 943835:96064e2069ea
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Sep 11 15:33:28 2020 +0000
description:
make(1): fix tests about nonexistent = and === operators
diffstat:
usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp | 7 ++++++-
usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk | 5 ++---
usr.bin/make/unit-tests/cond-cmp-string.exp | 3 +++
usr.bin/make/unit-tests/cond-cmp-string.mk | 5 ++---
4 files changed, 13 insertions(+), 7 deletions(-)
diffs (61 lines):
diff -r 6f5a16c7c072 -r 96064e2069ea usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp
--- a/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp Fri Sep 11 15:28:29 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp Fri Sep 11 15:33:28 2020 +0000
@@ -1,1 +1,6 @@
-exit status 0
+make: "cond-cmp-numeric-eq.mk" line 54: warning: Unknown operator
+make: "cond-cmp-numeric-eq.mk" line 54: Malformed conditional (!(12345 = 12345))
+make: "cond-cmp-numeric-eq.mk" line 61: Malformed conditional (!(12345 === 12345))
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
+exit status 1
diff -r 6f5a16c7c072 -r 96064e2069ea usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk
--- a/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk Fri Sep 11 15:28:29 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk Fri Sep 11 15:33:28 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-numeric-eq.mk,v 1.2 2020/09/11 15:19:04 rillig Exp $
+# $NetBSD: cond-cmp-numeric-eq.mk,v 1.3 2020/09/11 15:33:28 rillig Exp $
#
# Tests for numeric comparisons with the == operator in .if conditions.
@@ -50,8 +50,7 @@
.endif
-# There is no = operator for numbers. Well, not quite, there is one, but
-# it generates a warning. Therefore it is not used in practice.
+# There is no = operator for numbers.
.if !(12345 = 12345)
. error
.else
diff -r 6f5a16c7c072 -r 96064e2069ea usr.bin/make/unit-tests/cond-cmp-string.exp
--- a/usr.bin/make/unit-tests/cond-cmp-string.exp Fri Sep 11 15:28:29 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-string.exp Fri Sep 11 15:33:28 2020 +0000
@@ -1,5 +1,8 @@
make: "cond-cmp-string.mk" line 18: Malformed conditional (str != str)
make: "cond-cmp-string.mk" line 37: Malformed conditional ("string" != "str""ing")
+make: "cond-cmp-string.mk" line 42: warning: String comparison operator should be either == or !=
+make: "cond-cmp-string.mk" line 42: Malformed conditional (!("value" = "value"))
+make: "cond-cmp-string.mk" line 49: Malformed conditional (!("value" === "value"))
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 6f5a16c7c072 -r 96064e2069ea usr.bin/make/unit-tests/cond-cmp-string.mk
--- a/usr.bin/make/unit-tests/cond-cmp-string.mk Fri Sep 11 15:28:29 2020 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-string.mk Fri Sep 11 15:33:28 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-string.mk,v 1.4 2020/09/11 15:19:04 rillig Exp $
+# $NetBSD: cond-cmp-string.mk,v 1.5 2020/09/11 15:33:28 rillig Exp $
#
# Tests for string comparisons in .if conditions.
@@ -38,8 +38,7 @@
.error
.endif
-# There is no = operator for strings. Well, not quite, there is one, but
-# it generates a warning. Therefore it is not used in practice.
+# There is no = operator for strings.
.if !("value" = "value")
. error
.else
Home |
Main Index |
Thread Index |
Old Index