summaryrefslogtreecommitdiff
path: root/tests/gentest/patsubst.1.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gentest/patsubst.1.test')
-rwxr-xr-xtests/gentest/patsubst.1.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/gentest/patsubst.1.test b/tests/gentest/patsubst.1.test
new file mode 100755
index 00000000..6213ef87
--- /dev/null
+++ b/tests/gentest/patsubst.1.test
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# gentest/patsubst.1.test 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
+