]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/bmake/unit-tests/modts
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / bmake / unit-tests / modts
1
2 LIST= one two three
3 LIST+= four five six
4
5 FU_mod-ts = a / b / cool
6
7 AAA= a a a
8 B.aaa= Baaa
9
10 all:   mod-ts
11
12 # Use print or printf iff they are builtin.
13 # XXX note that this causes problems, when make decides 
14 # there is no need to use a shell, so avoid where possible.
15 .if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != ""
16 PRINT= print -r --
17 .elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != ""
18 PRINT= printf '%s\n'
19 .else
20 PRINT= echo
21 .endif
22
23 mod-ts:
24         @echo 'LIST="${LIST}"'
25         @echo 'LIST:ts,="${LIST:ts,}"'
26         @echo 'LIST:ts/:tu="${LIST:ts/:tu}"'
27         @echo 'LIST:ts::tu="${LIST:ts::tu}"'
28         @echo 'LIST:ts:tu="${LIST:ts:tu}"'
29         @echo 'LIST:tu:ts/="${LIST:tu:ts/}"'
30         @echo 'LIST:ts:="${LIST:ts:}"'
31         @echo 'LIST:ts="${LIST:ts}"'
32         @echo 'LIST:ts:S/two/2/="${LIST:ts:S/two/2/}"'
33         @echo 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"'
34         @echo 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"'
35         @echo "Pretend the '/' in '/n' etc. below are back-slashes."
36         @${PRINT} 'LIST:ts/n="${LIST:ts\n}"'
37         @${PRINT} 'LIST:ts/t="${LIST:ts\t}"'
38         @${PRINT} 'LIST:ts/012:tu="${LIST:ts\012:tu}"'
39         @${PRINT} 'LIST:tx="${LIST:tx}"'
40         @${PRINT} 'LIST:ts/x:tu="${LIST:ts\x:tu}"'
41         @${PRINT} 'FU_$@="${FU_${@:ts}:ts}"'
42         @${PRINT} 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?'
43         @${PRINT} 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?'