xref: /freebsd/contrib/bmake/unit-tests/cond-op-not.mk (revision 36d6566e5985030fd2f1100bd9c1387bbe0bd290)
1# $NetBSD: cond-op-not.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $
2#
3# Tests for the ! operator in .if conditions.
4
5# The exclamation mark negates its operand.
6.if !1
7.  error
8.endif
9
10# Exclamation marks can be chained.
11# This doesn't happen in practice though.
12.if !!!1
13.  error
14.endif
15
16# The ! binds more tightly than the &&.
17.if !!0 && 1
18.  error
19.endif
20
21all:
22	@:;
23