Subramanya Sastry has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201348

Change subject: Sync parserTests with core version.
......................................................................

Sync parserTests with core version.

Change-Id: I8e38c6c5aed4a90298757714e9d13da94cc3e564
---
M tests/fetch-parserTests.txt.js
M tests/parserTests.txt
2 files changed, 81 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/48/201348/1

diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index 8c3e868..e73b36b 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 //     and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "f6d909cfbdbf19c5b2de360f26c59919b3f3be8f";
+var expectedSHA1 = "1dd1c769fc68d6ea7a8ae12aad04e657470223d3";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "5205405385397782b5288b429f49c9d8c97ac6c6";
+var latestCommit = "278c83af8b2426d95f578e01e3bc679abf7b9d4b";
 
 var fs = require('fs'),
        path = require('path'),
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 473d935..e965352 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -26,6 +26,7 @@
 # php           php-only test (not run by the parsoid parser unless
 #                 the test includes an html/parsoid section)
 # showtitle     make the first line the title
+# showindicators make the first lines the page status indicators
 # comment       run through Linker::formatComment() instead of main parser
 # local         format section links in edit comment text as local links
 # notoc         disable table of contents
@@ -13961,7 +13962,7 @@
 </ul>
 </div>
 
-<h2><span class="mw-headline" id="text_.3E_text">text &gt; text</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit 
section: text > text">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="text_.3E_text">text &gt; text</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit 
section: text &gt; text">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
 <p>section 1
 </p>
 <h2><span class="mw-headline" id="text_.3C_text">text &lt; text</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit 
section: text &lt; text">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
@@ -19205,6 +19206,82 @@
 !! end
 
 !! test
+Page status indicators: Empty name is invalid
+!! options
+showindicators
+!! wikitext
+<indicator name=" "></indicator>
+<indicator></indicator>
+!! html
+<p><span class="error"><strong>Error:</strong> Page status indicators' 
<code>name</code> attribute must not be empty.</span>
+<span class="error"><strong>Error:</strong> Page status indicators' 
<code>name</code> attribute must not be empty.</span>
+</p>
+!! end
+
+!! test
+Page status indicators: Weird syntaxes that are okay
+!! options
+showindicators
+!! wikitext
+<indicator name="empty" />
+<indicator name></indicator>
+!! html
+empty=
+name=
+<p><br />
+</p>
+!! end
+
+!! test
+Page status indicators: Torture test
+!! options
+showindicators
+!! wikitext
+<indicator name="01">hello world</indicator>
+<indicator name="02">[[Main Page]]</indicator>
+<indicator name="03">[[File:Foobar.jpg|25px|link=]]</indicator>
+<indicator name="04">[[File:Foobar.jpg|25px]]</indicator>
+<indicator name="05">* foo
+* bar</indicator>
+<indicator name="06"><nowiki>foo</nowiki></indicator>
+<indicator name="07"> Preformatted</indicator>
+<indicator name="08"><div>Broken tag</indicator>
+<indicator name="09">{| class=wikitable
+| cell
+|}</indicator>
+<indicator name="10">Two
+
+paragraphs</indicator>
+!! html
+01=hello world
+02=<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
+03=<img alt="Foobar.jpg" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg"; 
width="25" height="3" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" />
+04=<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/25px-Foobar.jpg"; 
width="25" height="3" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/38px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/50px-Foobar.jpg 2x" /></a>
+05=<ul><li> foo</li>
+<li> bar</li></ul>
+
+06=foo
+07=<pre>Preformatted
+</pre>
+08=<div>Broken tag</div>
+
+09=<table class="wikitable">
+<tr>
+<td> cell
+</td></tr></table>
+
+10=<p>Two
+</p><p>paragraphs
+</p>
+<p><br />
+</p><p><br />
+</p><p><br />
+</p><p><br />
+</p><p><br />
+</p>
+!! end
+
+!! test
 preload: check <noinclude> and <includeonly>
 !! options
 preload
@@ -19592,7 +19669,7 @@
 </div>
 
 <h2><span class="mw-headline" id="Hello"><sup 
class="in-h2">Hello</sup></span><span class="mw-editsection"><span 
class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit 
section: Hello">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
-<h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> 
b"&gt;Evilbye</sup></span><span class="mw-editsection"><span 
class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit 
section: b&quot;>Evilbye">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> 
b"&gt;Evilbye</sup></span><span class="mw-editsection"><span 
class="mw-editsection-bracket">[</span><a 
href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit 
section: b&quot;&gt;Evilbye">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
 
 !! end
 

-- 
To view, visit https://gerrit.wikimedia.org/r/201348
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e38c6c5aed4a90298757714e9d13da94cc3e564
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to