t40c term[] count fix
[minix.git] / usr.bin / make / unit-tests / modts
blob616bd8944f21ebeaced14f60032a58a506e04755
2 LIST= one two three
3 LIST+= four five six
5 FU_mod-ts = a / b / cool
7 AAA= a a a
8 B.aaa= Baaa
10 all:   mod-ts
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
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?'