summaryrefslogtreecommitdiff
path: root/tests/other-tests/sync-lines.test
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@raspberryginger.com>2000-02-17 03:03:19 +0000
committerJeff Bailey <jbailey@raspberryginger.com>2000-02-17 03:03:19 +0000
commitbd11691d6520f7539e7ed2efdf75f266719e27e9 (patch)
tree13d3a4e534f6df846a128af52438769b9f51f09e /tests/other-tests/sync-lines.test
downloadm4-bd11691d6520f7539e7ed2efdf75f266719e27e9.tar.gz
Initial revision
Diffstat (limited to 'tests/other-tests/sync-lines.test')
-rwxr-xr-xtests/other-tests/sync-lines.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/other-tests/sync-lines.test b/tests/other-tests/sync-lines.test
new file mode 100755
index 00000000..c151f669
--- /dev/null
+++ b/tests/other-tests/sync-lines.test
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# sync-lines.test is part of the GNU m4 testsuite
+
+. ${srcdir}/defs
+
+cat ${srcdir}/other-tests/sync-lines.m4 >in
+
+cat <<\EOF >ok
+#line 2 "in"
+# Several input lines, expanding to one
+#line 5
+ xyz
+foo line one.
+#line 6
+foo line two.
+#line 6
+foo line three.
+# Several input lines, expanding to none
+#line 11
+# one input line, expanding to several output lines
+foo line one.
+#line 12
+foo line two.
+#line 12
+foo line three. foo line one.
+#line 12
+foo line two.
+#line 12
+foo line three.
+EOF
+
+M4PATH=$srcdir:$srcdir/other-tests $M4 -d in >out 2>err
+sed -e "s, ../../src/m4:, m4:," err >sederr && mv sederr err
+$CMP -s out ok