xref: /freebsd/contrib/bmake/unit-tests/varmod-to-lower.mk (revision 4fde40d9b540ea1a544cb4378a14f2f6da85ca6d)
1*4fde40d9SSimon J. Gerraty# $NetBSD: varmod-to-lower.mk,v 1.6 2022/11/29 23:54:55 rillig Exp $
22c3632d1SSimon J. Gerraty#
3*4fde40d9SSimon J. Gerraty# Tests for the :tl variable modifier, which converts the expression value
4*4fde40d9SSimon J. Gerraty# to lowercase.
5e2eeea75SSimon J. Gerraty#
6e2eeea75SSimon J. Gerraty# TODO: What about non-ASCII characters? ISO-8859-1, UTF-8?
72c3632d1SSimon J. Gerraty
82c3632d1SSimon J. Gerraty.if ${:UUPPER:tl} != "upper"
92c3632d1SSimon J. Gerraty.  error
102c3632d1SSimon J. Gerraty.endif
112c3632d1SSimon J. Gerraty
122c3632d1SSimon J. Gerraty.if ${:Ulower:tl} != "lower"
132c3632d1SSimon J. Gerraty.  error
142c3632d1SSimon J. Gerraty.endif
152c3632d1SSimon J. Gerraty
162c3632d1SSimon J. Gerraty.if ${:UMixeD case.:tl} != "mixed case."
172c3632d1SSimon J. Gerraty.  error
182c3632d1SSimon J. Gerraty.endif
192c3632d1SSimon J. Gerraty
20*4fde40d9SSimon J. Gerraty# The ':tl' modifier works on the whole string, without splitting it into
21*4fde40d9SSimon J. Gerraty# words.
22*4fde40d9SSimon J. Gerraty.if ${:Umultiple   spaces:tl} != "multiple   spaces"
23*4fde40d9SSimon J. Gerraty.  error
24*4fde40d9SSimon J. Gerraty.endif
25*4fde40d9SSimon J. Gerraty
26*4fde40d9SSimon J. Gerratyall: .PHONY
27