diff options
Diffstat (limited to 'contrib/bmake/unit-tests/ternary.mk')
-rw-r--r-- | contrib/bmake/unit-tests/ternary.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/bmake/unit-tests/ternary.mk b/contrib/bmake/unit-tests/ternary.mk new file mode 100644 index 0000000..77f8349 --- /dev/null +++ b/contrib/bmake/unit-tests/ternary.mk @@ -0,0 +1,8 @@ + +all: + @for x in "" A= A=42; do ${.MAKE} -f ${MAKEFILE} show $$x; done + +show: + @echo "The answer is ${A:?known:unknown}" + @echo "The answer is ${A:?$A:unknown}" + @echo "The answer is ${empty(A):?empty:$A}" |