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 more tests for parsing ...
details: https://anonhg.NetBSD.org/src/rev/c2316671db49
branches: trunk
changeset: 946001:c2316671db49
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Nov 13 08:35:34 2020 +0000
description:
make(1): add more tests for parsing .else with argument
diffstat:
usr.bin/make/unit-tests/directive-else.mk | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r eb4874b0ca16 -r c2316671db49 usr.bin/make/unit-tests/directive-else.mk
--- a/usr.bin/make/unit-tests/directive-else.mk Fri Nov 13 08:33:07 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-else.mk Fri Nov 13 08:35:34 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: directive-else.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: directive-else.mk,v 1.5 2020/11/13 08:35:34 rillig Exp $
#
# Tests for the .else directive.
@@ -28,5 +28,17 @@
. info After an extra .else, everything is skipped.
.endif
+# An .else may have a comment. This comment does not count as an argument,
+# therefore no parse error.
+.if 0
+.else # comment
+.endif
+
+# A variable expression does count as an argument, even if it is empty.
+# XXX: This should be a parse error.
+.if 0
+.else ${:U}
+.endif
+
all:
@:;
Home |
Main Index |
Thread Index |
Old Index