Re: [PATCH] Line synchronisation output in comments

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.patches
Message-ID <[email protected]>
According to Eric Blake on 5/25/2007 11:26 AM:
> Meanwhile, I have to port it to HEAD.  And I would also like to fix the bug 
> that I uncovered in the interactions between -s and divert (but probably only 
> on head, as I think it will be pretty invasive for a stable branch).  For an 
> example of the bug, note that "#line 3" is not a preprocessor directive any 
> more.
> 
> $ m4 -s
> divert(2)2divert(1)1
> dnl
> undivert
> ^D
> 1
> #line 1 "stdin"
> 2#line 3 "stdin"
> 

To make sure I don't forget this:

2007-05-28  Eric Blake  <[email protected]>

	* tests/options.at (--syncoutput): Add xfailed test.

Index: tests/options.at
===================================================================
RCS file: /sources/m4/m4/tests/options.at,v
retrieving revision 1.25
diff -u -p -r1.25 options.at
--- tests/options.at	5 Feb 2007 17:31:10 -0000	1.25
+++ tests/options.at	28 May 2007 22:06:58 -0000
@@ -759,6 +759,20 @@ hi
 hi
 ]])

+dnl synclines should always start at the beginning of a line.
+dnl this does not (yet) happen reliably when diversions do not
+dnl always end in newline
+AT_XFAIL_IF([:])
+AT_DATA([in.m4], [[divert(2)2divert(1)1
+dnl
+undivert
+]])
+
+AT_CHECK_M4([-s in.m4], [0], [[1
+#line 1 "stdin"
+2
+]])
+
 AT_CLEANUP



-- 
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.