aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/directive-endif.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/directive-endif.mk')
-rw-r--r--contrib/bmake/unit-tests/directive-endif.mk28
1 files changed, 12 insertions, 16 deletions
diff --git a/contrib/bmake/unit-tests/directive-endif.mk b/contrib/bmake/unit-tests/directive-endif.mk
index 10dd6ce22ce8..5e01382af5f2 100644
--- a/contrib/bmake/unit-tests/directive-endif.mk
+++ b/contrib/bmake/unit-tests/directive-endif.mk
@@ -1,4 +1,4 @@
-# $NetBSD: directive-endif.mk,v 1.5 2020/12/14 21:56:17 rillig Exp $
+# $NetBSD: directive-endif.mk,v 1.7 2023/06/01 20:56:35 rillig Exp $
#
# Tests for the .endif directive.
#
@@ -8,18 +8,16 @@
# See also:
# Cond_EvalLine
-# TODO: Implementation
-
.MAKEFLAGS: -dL
-# Error: .endif does not take arguments
.if 0
-# Since 2020-12-15, complain about the extra text after the 'endif'.
+# Since 2020-12-15:
+# expect+1: The .endif directive does not take arguments
.endif 0
-# Error: .endif does not take arguments
.if 1
-# Since 2020-12-15, complain about the extra text after the 'endif'.
+# Since 2020-12-15:
+# expect+1: The .endif directive does not take arguments
.endif 1
# Comments are allowed after an '.endif'.
@@ -29,21 +27,19 @@
# Only whitespace and comments are allowed after an '.endif', but nothing
# else.
.if 1
-# Since 2020-12-15, complain about the extra text after the 'endif'.
+# Since 2020-12-15:
+# expect+1: The .endif directive does not take arguments
.endif0
# Only whitespace and comments are allowed after an '.endif', but nothing
# else.
.if 1
-# Since 2020-12-15, complain about the extra text after the 'endif'.
+# Since 2020-12-15:
+# expect+1: The .endif directive does not take arguments
.endif/
-# After an '.endif', no other letter must occur. This 'endifx' is not
-# parsed as an 'endif', therefore another '.endif' must follow to balance
-# the directives.
+# After an '.endif', no other letter must occur.
.if 1
+# expect+1: Unknown directive "endifx"
.endifx
-.endif # to close the preceding '.if'
-
-all:
- @:;
+.endif # to close the preceding '.if'