diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-09-05 16:11:04 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-09-05 16:11:04 +0000 |
commit | 6bbc783f48498b808e19db4441299dc7d85a278b (patch) | |
tree | be201219a56594c76537191ee91fdd3ef8cfb348 /unit-tests/cond-op-not.mk | |
parent | 367d32e2b15fe0397ddecccaa04cf9ed0164c969 (diff) | |
download | src-test2-6bbc783f48498b808e19db4441299dc7d85a278b.tar.gz src-test2-6bbc783f48498b808e19db4441299dc7d85a278b.zip |
Notes
Diffstat (limited to 'unit-tests/cond-op-not.mk')
-rw-r--r-- | unit-tests/cond-op-not.mk | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/unit-tests/cond-op-not.mk b/unit-tests/cond-op-not.mk new file mode 100644 index 000000000000..ad0a0939eecf --- /dev/null +++ b/unit-tests/cond-op-not.mk @@ -0,0 +1,22 @@ +# $NetBSD: cond-op-not.mk,v 1.3 2020/08/28 14:48:37 rillig Exp $ +# +# Tests for the ! operator in .if conditions. + +# The exclamation mark negates its operand. +.if !1 +.error +.endif + +# Exclamation marks can be chained. +# This doesn't happen in practice though. +.if !!!1 +.error +.endif + +# The ! binds more tightly than the &&. +.if !!0 && 1 +.error +.endif + +all: + @:; |