diff options
Diffstat (limited to 'tests/gentest/patsubst.1.m4')
-rwxr-xr-x | tests/gentest/patsubst.1.m4 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/gentest/patsubst.1.m4 b/tests/gentest/patsubst.1.m4 new file mode 100755 index 00000000..1b39ecba --- /dev/null +++ b/tests/gentest/patsubst.1.m4 @@ -0,0 +1,27 @@ +#!/bin/sh + +# gentest/patsubst.1.m4 is part of the GNU m4 testsuite +# generated from example in ../doc/m4.texinfo line 2983 + +. ${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 + |