summaryrefslogtreecommitdiff
path: root/tests/patsubst.1.test
blob: 152d961db0cfca6af88f7291e5299cabf1cd487a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

# patsubst.1.test is part of the GNU m4 testsuite
# generated from example in ../doc/m4.texinfo line 2984

. ${srcdir}/defs

cat <<\EOF >in
patsubst(`GNUs not Unix', `^', `OBS: ')
patsubst(`GNUs not Unix', `\<', `OBS: ')
patsubst(`GNUs not Unix', `\w*', `(\&)')
patsubst(`GNUs not Unix', `\w+', `(\&)')
patsubst(`GNUs not Unix', `[A-Z][a-z]+')
EOF

cat <<\EOF >ok
OBS: GNUs not Unix
OBS: GNUs OBS: not OBS: Unix
(GNUs)() (not)() (Unix)
(GNUs) (not) (Unix)
GN not 
EOF

$M4 -d in >out

$CMP -s out ok