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): add tests for parsing .if c...
details: https://anonhg.NetBSD.org/src/rev/b120a216f310
branches: trunk
changeset: 947520:b120a216f310
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Dec 14 21:02:25 2020 +0000
description:
make(1): add tests for parsing .if conditions
diffstat:
usr.bin/make/unit-tests/directive-if.exp | 2 ++
usr.bin/make/unit-tests/directive-if.mk | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 7a6a5bacc54f -r b120a216f310 usr.bin/make/unit-tests/directive-if.exp
--- a/usr.bin/make/unit-tests/directive-if.exp Mon Dec 14 20:57:31 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-if.exp Mon Dec 14 21:02:25 2020 +0000
@@ -10,6 +10,8 @@
make: "directive-if.mk" line 66: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 70: Don't do this, always put a space after a directive.
make: "directive-if.mk" line 76: Don't do this, always put a space around comparison operators.
+make: "directive-if.mk" line 82: Don't do this, always put a space after a directive.
+make: "directive-if.mk" line 86: Don't do this, always put a space after a directive.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 7a6a5bacc54f -r b120a216f310 usr.bin/make/unit-tests/directive-if.mk
--- a/usr.bin/make/unit-tests/directive-if.mk Mon Dec 14 20:57:31 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-if.mk Mon Dec 14 21:02:25 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: directive-if.mk,v 1.7 2020/11/15 20:20:58 rillig Exp $
+# $NetBSD: directive-if.mk,v 1.8 2020/12/14 21:02:25 rillig Exp $
#
# Tests for the .if directive.
#
@@ -78,4 +78,12 @@
. error
.endif
+.if(1)
+. info Don't do this, always put a space after a directive.
+.endif
+
+.if!0
+. info Don't do this, always put a space after a directive.
+.endif
+
all:
Home |
Main Index |
Thread Index |
Old Index