xref: /freebsd/contrib/bmake/unit-tests/varmod-to-one-word.mk (revision cab6a39d7b343596a5823e65c0f7b426551ec22d)
1# $NetBSD: varmod-to-one-word.mk,v 1.3 2020/12/20 23:29:50 rillig Exp $
2#
3# Tests for the :tW variable modifier, which treats the variable value
4# as a single word, for all following modifiers.
5
6SENTENCE=	The quick brown fox jumps over the lazy brown dog.
7
8.if ${SENTENCE:tW:[#]} != 1
9.  error
10.endif
11.if ${SENTENCE:tw:[#]} != 10
12.  error
13.endif
14
15# Protect against accidental freeing of the variable value.
16.if ${SENTENCE} != "The quick brown fox jumps over the lazy brown dog."
17.  error
18.endif
19
20all:
21	@:;
22