xref: /src/contrib/bmake/unit-tests/opt-debug-cond.mk (revision 2f2a5ecdf8a04af94c0c5995fd321cafaf630e45)
12061c94eSSimon J. Gerraty# $NetBSD: opt-debug-cond.mk,v 1.3 2022/04/15 09:33:20 rillig Exp $
2302da1a3SSimon J. Gerraty#
3302da1a3SSimon J. Gerraty# Tests for the -dc command line option, which adds debug logging for the
4302da1a3SSimon J. Gerraty# evaluation of conditional expressions, such as in .if directives and
5302da1a3SSimon J. Gerraty# ${cond:?then:else} expressions.
6302da1a3SSimon J. Gerraty
7cdde9e89SSimon J. Gerraty.MAKEFLAGS: -dc
8302da1a3SSimon J. Gerraty
9cdde9e89SSimon J. Gerraty# expect: CondParser_Eval: ${:U12345} > ${:U55555}
102061c94eSSimon J. Gerraty# expect: Comparing 12345.000000 > 55555.000000
11cdde9e89SSimon J. Gerraty.if ${:U12345} > ${:U55555}
12cdde9e89SSimon J. Gerraty
13cdde9e89SSimon J. Gerraty# expect: CondParser_Eval: "string" != "string"
142061c94eSSimon J. Gerraty# expect: Comparing "string" != "string"
15cdde9e89SSimon J. Gerraty.elif "string" != "string"
16cdde9e89SSimon J. Gerraty
17cdde9e89SSimon J. Gerraty# expect: CondParser_Eval: "nonempty"
18cdde9e89SSimon J. Gerraty.elif "nonempty"
19cdde9e89SSimon J. Gerraty
20cdde9e89SSimon J. Gerraty.endif
21cdde9e89SSimon J. Gerraty
22cdde9e89SSimon J. Gerraty.MAKEFLAGS: -d0
23cdde9e89SSimon J. Gerraty
24cdde9e89SSimon J. Gerratyall: .PHONY
25