diff options
Diffstat (limited to 'unit-tests/cond-op-or.mk')
-rw-r--r-- | unit-tests/cond-op-or.mk | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/unit-tests/cond-op-or.mk b/unit-tests/cond-op-or.mk new file mode 100644 index 000000000000..696b9dd23062 --- /dev/null +++ b/unit-tests/cond-op-or.mk @@ -0,0 +1,27 @@ +# $NetBSD: cond-op-or.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 +# true. +.if 1 || ${UNDEF} +.endif + +all: + @:; |