MarkTraceur has submitted this change and it was merged.

Change subject: Some additional test cases for Parsoid.
......................................................................


Some additional test cases for Parsoid.

1) "border" attribute can be used in addition to "framed" / "frameless"
on images.

2) parsoid no longer adds semicolons to style attributes where they don't
exist in the source.

3) empty table rows are elided by the PHP parser.  (Parsoid doesn't do
this yet.)

4) Italicized possessive (unmatched single-quote).  (Parsoid currently
misparses this.)

5) Tests for localized Image handling; check that localized image
options are handled correctly.

Change-Id: I9771374ff167df39535ec99c5f292f739eab8fe7
---
M tests/parser/parserTests.txt
1 file changed, 63 insertions(+), 2 deletions(-)

Approvals:
  MarkTraceur: Looks good to me, approved



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index df8b9e2..c5151ca 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -491,7 +491,6 @@
 !!end
 
 
-
 !! test
 Italics and bold: other quote tests: (3,(2,2),3)
 !! input
@@ -500,6 +499,16 @@
 <p><b>this is about <i>foo's</i> family</b>
 </p>
 !!end
+
+
+!! test
+Italicized possessive
+!! input
+The ''[[Main Page]]'''s talk page.
+!! result
+<p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk 
page.
+</p>
+!! end
 
 ###
 ### <nowiki> test cases
@@ -7066,6 +7075,37 @@
 [[Image:foobar.jpg|a|class=b]]
 !! result
 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" 
src="http://example.com/images/3/3a/Foobar.jpg"; width="1941" height="220" 
class="b" /></a>
+</p>
+!! end
+
+!! test
+Localized image handling (1).
+!! options
+language=es
+!! input
+[[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
+!! result
+<div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" 
src="http://example.com/images/3/3a/Foobar.jpg"; width="1941" height="220" 
/></a></div>
+
+!! end
+
+!! test
+Localized image handling (2).
+!! options
+language=es
+!! input
+[[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
+!! result
+<div class="thumb tleft"><div class="thumbinner" style="width:182px;"><a 
href="/wiki/Foo" title="Foo"><img alt="" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="thumbimage" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  
<div class="thumbcaption"><div class="magnify"><a 
href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"><img 
src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" 
/></a></div>caption</div></div></div>
+
+!! end
+
+!! test
+"border", "frameless" and "class" attributes on an image.
+!! input
+[[File:Foobar.jpg|frameless|border|class=extra|caption]]
+!! result
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img 
alt="caption" 
src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg"; 
width="180" height="20" class="extra thumbborder" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
 </p>
 !! end
 
@@ -13662,7 +13702,7 @@
 <table>
 <tr>
 <td title="Hello world">Foo
-</td><td style="color: red;">Bar
+</td><td style="color: red">Bar
 </td></tr></table>
 
 !! end
@@ -13712,6 +13752,27 @@
 
 !!end
 
+!!test
+Empty table rows go away
+!!input
+{|
+| Hello
+| there
+|- class="foo"
+|-
+|}
+!! result
+<table>
+<tr>
+<td> Hello
+</td>
+<td> there
+</td></tr>
+
+</table>
+
+!! end
+
 TODO:
 more images
 more tables

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9771374ff167df39535ec99c5f292f739eab8fe7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott <wikime...@cscott.net>
Gerrit-Reviewer: GWicke <gwi...@wikimedia.org>
Gerrit-Reviewer: MarkTraceur <mtrac...@member.fsf.org>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to