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/f554eebfbf1b
branches: trunk
changeset: 979128:f554eebfbf1b
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 8941c8c4bce6 -r f554eebfbf1b 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 8941c8c4bce6 -r f554eebfbf1b 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