xref: /freebsd/contrib/bmake/unit-tests/opt-debug-cond.mk (revision 7be9a3b45356747f9fcb6d69a722c1c95f8060bf)
1# $NetBSD: opt-debug-cond.mk,v 1.2 2022/01/23 16:09:38 rillig Exp $
2#
3# Tests for the -dc command line option, which adds debug logging for the
4# evaluation of conditional expressions, such as in .if directives and
5# ${cond:?then:else} expressions.
6
7.MAKEFLAGS: -dc
8
9# expect: CondParser_Eval: ${:U12345} > ${:U55555}
10# expect: lhs = 12345.000000, rhs = 55555.000000, op = >
11.if ${:U12345} > ${:U55555}
12
13# expect: CondParser_Eval: "string" != "string"
14# expect: lhs = "string", rhs = "string", op = !=
15.elif "string" != "string"
16
17# expect: CondParser_Eval: "nonempty"
18.elif "nonempty"
19
20.endif
21
22.MAKEFLAGS: -d0
23
24all: .PHONY
25