diff options
Diffstat (limited to 'contrib/bmake/unit-tests/varmod-to-title.mk')
| -rw-r--r-- | contrib/bmake/unit-tests/varmod-to-title.mk | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/bmake/unit-tests/varmod-to-title.mk b/contrib/bmake/unit-tests/varmod-to-title.mk new file mode 100644 index 000000000000..f99e5441a8fb --- /dev/null +++ b/contrib/bmake/unit-tests/varmod-to-title.mk @@ -0,0 +1,31 @@ +# $NetBSD: varmod-to-title.mk,v 1.1 2024/07/01 21:02:26 sjg Exp $ +# +# Tests for the :tc variable modifier, which converts the expression value +# to lowercase. +# +# TODO: What about non-ASCII characters? ISO-8859-1, UTF-8? + +.if ${:UUPPER:tt} != "Upper" +. error +.endif + +.if ${:Ulower:tt} != "Lower" +. error +.endif + +.if ${:UMixeD case.:tt} != "Mixed Case." +. error +.endif + +# The ':tt' modifier works on the whole string, without splitting it into +# words. +.if ${:Umultiple spaces:tt} != "Multiple Spaces" +. error +.endif + +# Note words only count if separated by spaces +.if ${:Uthis&that or os/2:tt} != "This&that Or Os/2" +. error +.endif + +all: .PHONY |
