mawk broken output
Ypnose opened this issue · 1 comments
Ypnose commented
Running the regression tests using mawk-1.3.4-20131226
shows only one regression, within BLOCK_CODE_PRE_3
(this regression seems to be fixed in 1.3.4-20140914
):
--- BLOCK_CODE_PRE_3.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_3.gen 2014-10-26 12:51:44.994553357 +0100
@@ -1,5 +1,4 @@
-<pre><code>====
-Here my code
+<pre><code>Here my code
====</code></pre>
<pre><code>
If you use mawk-1.3.4-20140914
, multiple regressions are shown (using the same code and regexes):
--- BLOCK_CODE_PRE.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE.gen 2014-10-26 12:56:30.854552376 +0100
@@ -1,9 +1,11 @@
-<pre><code>printf "%s\n" "This is plain wrong!" >&2</code></pre>
+<pre><code>printf "%s\n" "This is plain wrong!" >&2
+====</code></pre>
<pre><code>Filesystem Size Used Avail Use% Mounted on
/dev/sda5 12G 2.5G 8.6G 23% /
dev 3.9G 0 3.9G 0% /dev
run 4.0G 592K 3.9G 1% /run
-tmpfs 4.0G 0 4.0G 0% /dev/shm</code></pre>
+tmpfs 4.0G 0 4.0G 0% /dev/shm
+====</code></pre>
<pre><code>Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1045719039 1045716992 498,7G 5 Extended
/dev/sda2 1129605120 1192519679 62914560 30G 7 HPFS/NTFS/exFAT
@@ -19,4 +21,5 @@
/dev/sda10 459495424 1045719039 586223616 279,5G 83 Linux
-# Another comment for testing purpose</code></pre>
+# Another comment for testing purpose
+====</code></pre>
--- BLOCK_CODE_PRE_2.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_2.gen 2014-10-26 12:56:30.857885709 +0100
@@ -6,7 +6,8 @@
INSIDE ==== MIDDLE
HEH BRO
-==== LAST LINE</code></pre>
+ ==== LAST LINE
+====</code></pre>
<pre><code>
bro >> nope
nana <he
@@ -20,4 +21,5 @@
<<
<<<
<<<<
-end of life / line</code></pre>
+ end of life / line
+====</code></pre>
--- BLOCK_CODE_PRE_3.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ BLOCK_CODE_PRE_3.gen 2014-10-26 12:56:30.864552376 +0100
@@ -1,13 +1,17 @@
<pre><code>====
Here my code
+====
====</code></pre>
<pre><code>
- BLOCK 2</code></pre>
+ BLOCK 2
+====</code></pre>
<pre><code> BLOCK 3
END
- TAB</code></pre>
+ TAB
+====</code></pre>
<pre><code>
BLOCK 4
- </code></pre>
+
+====</code></pre>
--- ESCAPE_CHARS.outvalid 2014-10-24 22:20:01.304559299 +0200
+++ ESCAPE_CHARS.gen 2014-10-26 12:56:30.867885709 +0100
@@ -12,4 +12,5 @@
<rel> = the release version you are using
<build> = the source date of the build. 20140710* and later will fit
<arch> = your system's architecture
-&& YOU'RE DONE</code></pre>
+&& YOU'RE DONE
+====</code></pre>
* LIST_UL ... OK
* PAGE_LINKS_A ... OK
* PARAGRAPH_P ... OK
--- TITLES_H.outvalid 2014-10-24 22:48:11.197886828 +0200
+++ TITLES_H.gen 2014-10-26 12:56:30.881219042 +0100
@@ -1,13 +1,16 @@
+<h1>:</h1>
+<h2>::</h2>
+<h3>:::</h3>
+<h1>This is the H1 title :</h1>
+<h1>This is the H1 title : </h1>
<h1>This is the H1 title</h1>
-<h1>This is the H1 title</h1>
-<h1>This is the H1 title</h1>
-<h2>This is the H2 level</h2>
-<h2>This is the H2 level</h2>
-<h3>This is the H3 level</h3>
-<h3>This is the H3 level</h3>
-<h4>This is the H4 level</h4>
+<h2>This is the H2 level ::</h2>
+<h2>This is the H2 level:: </h2>
+<h3>This is the H3 level :::</h3>
+<h3>This is the H3 level :::</h3>
<h4>This is the H4 level</h4>
-<h5>This is the H5 level</h5>
-<h5>This is the H5 level</h5>
-<h6>This is the H6 level</h6>
-<h6>This is the H6 level</h6>
+<h4>This is the H4 level :::: </h4>
+<h5>This is the H5 level:::::</h5>
+<h5>This is the H5 level ::::: </h5>
+<h6>This is the H6 level ::::::</h6>
+<h6>This is the H6 level :::::: </h6>
With nawk
, gawk
and OpenBSD nawk
, you don't have any issue. I'll contact the main dev ASAP.
EDIT: I'm pretty sure it's related to $
metacharacter...
Ypnose commented
Thomas Dickey, the current mawk
dev created a new release (mawk-1.3.4-20141027
), after my report. Now, the tests succeed.
* BLOCK_CODE_PRE ... OK
* BLOCK_CODE_PRE_2 ... OK
* BLOCK_CODE_PRE_3 ... OK
* ESCAPE_CHARS ... OK
* LIST_UL ... OK
* PAGE_LINKS_A ... OK
* PARAGRAPH_P ... OK
* TITLES_H ... OK
So, if you want to use mawk
, you need to update your executable.