Brion Vibber schrieb:
Magnus Manske wrote:
brion(a)pobox.com schrieb:
An automated run of parserTests.php showed the
following failures:
Running test A table with no data.... FAILED!
Running test A table with nothing but a caption... FAILED!
I fixed these two a few days ago so they generate additional
<tr><td></td></tr> elements. Can someone please confirm that it
works OK
now, so owe can fix parserTests.php to recognize that?
How do you know you fixed it if it doesn't pass the parser test?
Because I looked at the HTML output of a test page?
There are several possibilities:
* The fix is wrong
* The fix is incomplete, and didn't cover the test case
* The test case is wrong
* Differences in configuration or software versions cause different results in
your run of the parser tests and my run of the parser tests.
And because of these possibilities, I asked someone to verify my findings.
For reference, here's the long output from these two tests:
Running test A table with no data.... FAILED!
--- /tmp/mwParser-913954976-expected 2006-02-10 11:02:44.000000000 +0000
+++ /tmp/mwParser-913954976-actual 2006-02-10 11:02:44.000000000 +0000
@@ -1 +1,3 @@
+<table>
+</table>
This is outputting a <table> with no contents, which is technically invalid
HTML. The output fails the W3 validator. The fix is incomplete.
If you try a test page, you'll see that
{|
|}
works just fine. What I tried to ask in my original mail was
* is "{||}" (in one line) even correct syntax?
* should we care? AFAIK, the line after "{|" may only contain parameters
for <table>. So, ignoring "|}" and trying to close the table later is
the correct behaviour.
Running test A table with nothing but a caption... FAILED!
--- /tmp/mwParser-1216448957-expected 2006-02-10 11:02:44.000000000 +0000
+++ /tmp/mwParser-1216448957-actual 2006-02-10 11:02:44.000000000 +0000
@@ -1,6 +1,4 @@
<table>
<caption> caption
-</caption>
-<tr>
-<td>
-</td></tr></table>
+</caption><tr><td></td></tr></table>
+
This looks like it has all the right pieces, but the difference in whitespace
arrangement causes the comparison to the expected output to fail. Fix the test
case's expected output.
See, wasn't that hard :-)
Running
test Simple category... FAILED!
This seems to work as well.
Running test Simple category... FAILED!
--- /tmp/mwParser-579799119-expected 2006-02-10 11:02:49.000000000 +0000
+++ /tmp/mwParser-579799119-actual 2006-02-10 11:02:49.000000000 +0000
@@ -1 +1 @@
-<a href="/wiki/Category:MediaWiki_User%27s_Guide"
title="Category:MediaWiki
User's Guide">MediaWiki User's Guide</a>
+MediaWiki_User's_Guide
It looks like this test is trying to read from an internal structure which
changed format. It probably needs to be fixed up somehow.
I'll have a look.
Magnus