xref: /freebsd/contrib/bmake/unit-tests/opt-debug-cond.mk (revision 2f2a5ecdf8a04af94c0c5995fd321cafaf630e45)
1*2f2a5ecdSSimon J. Gerraty# $NetBSD: opt-debug-cond.mk,v 1.3 2022/04/15 09:33:20 rillig Exp $
2956e45f6SSimon J. Gerraty#
3956e45f6SSimon J. Gerraty# Tests for the -dc command line option, which adds debug logging for the
4956e45f6SSimon J. Gerraty# evaluation of conditional expressions, such as in .if directives and
5956e45f6SSimon J. Gerraty# ${cond:?then:else} expressions.
6956e45f6SSimon J. Gerraty
79f45a3c8SSimon J. Gerraty.MAKEFLAGS: -dc
8956e45f6SSimon J. Gerraty
99f45a3c8SSimon J. Gerraty# expect: CondParser_Eval: ${:U12345} > ${:U55555}
10*2f2a5ecdSSimon J. Gerraty# expect: Comparing 12345.000000 > 55555.000000
119f45a3c8SSimon J. Gerraty.if ${:U12345} > ${:U55555}
129f45a3c8SSimon J. Gerraty
139f45a3c8SSimon J. Gerraty# expect: CondParser_Eval: "string" != "string"
14*2f2a5ecdSSimon J. Gerraty# expect: Comparing "string" != "string"
159f45a3c8SSimon J. Gerraty.elif "string" != "string"
169f45a3c8SSimon J. Gerraty
179f45a3c8SSimon J. Gerraty# expect: CondParser_Eval: "nonempty"
189f45a3c8SSimon J. Gerraty.elif "nonempty"
199f45a3c8SSimon J. Gerraty
209f45a3c8SSimon J. Gerraty.endif
219f45a3c8SSimon J. Gerraty
229f45a3c8SSimon J. Gerraty.MAKEFLAGS: -d0
239f45a3c8SSimon J. Gerraty
249f45a3c8SSimon J. Gerratyall: .PHONY
25