summaryrefslogtreecommitdiff
path: root/unit-tests/cond-op-and.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/cond-op-and.mk')
-rw-r--r--unit-tests/cond-op-and.mk27
1 files changed, 27 insertions, 0 deletions
diff --git a/unit-tests/cond-op-and.mk b/unit-tests/cond-op-and.mk
new file mode 100644
index 0000000000000..a204a227c4f05
--- /dev/null
+++ b/unit-tests/cond-op-and.mk
@@ -0,0 +1,27 @@
+# $NetBSD: cond-op-and.mk,v 1.3 2020/08/28 14:48:37 rillig Exp $
+#
+# Tests for the && operator in .if conditions.
+
+.if 0 && 0
+.error
+.endif
+
+.if 1 && 0
+.error
+.endif
+
+.if 0 && 1
+.error
+.endif
+
+.if !(1 && 1)
+.error
+.endif
+
+# The right-hand side is not evaluated since the left-hand side is already
+# false.
+.if 0 && ${UNDEF}
+.endif
+
+all:
+ @:;