summaryrefslogtreecommitdiff
path: root/unit-tests/ternary
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/ternary')
-rw-r--r--unit-tests/ternary8
1 files changed, 8 insertions, 0 deletions
diff --git a/unit-tests/ternary b/unit-tests/ternary
new file mode 100644
index 0000000..77f8349
--- /dev/null
+++ b/unit-tests/ternary
@@ -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}"