From 0bc78522f789c696c61006ae62b6622982cbd572 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Fri, 22 Feb 2013 22:38:36 -0500 Subject: [PATCH] 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 --- tests/parser/parserTests.txt | 65 ++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index df8b9e2b9b..c5151ca9ca 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -491,7 +491,6 @@ Italics and bold: other quote tests: (3,2,3,3) !!end - !! test Italics and bold: other quote tests: (3,(2,2),3) !! input @@ -501,6 +500,16 @@ Italics and bold: other quote tests: (3,(2,2),3)

!!end + +!! test +Italicized possessive +!! input +The ''[[Main Page]]'''s talk page. +!! result +

The Main Page's talk page. +

+!! end + ### ### test cases ### @@ -7069,6 +7078,37 @@ Custom class

!! end +!! test +Localized image handling (1). +!! options +language=es +!! input +[[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]] +!! result +
caption
+ +!! end + +!! test +Localized image handling (2). +!! options +language=es +!! input +[[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]] +!! result +
caption
+ +!! end + +!! test +"border", "frameless" and "class" attributes on an image. +!! input +[[File:Foobar.jpg|frameless|border|class=extra|caption]] +!! result +

caption +

+!! end + !! article File:Barfoo.jpg !! text @@ -13662,7 +13702,7 @@ disabled
Foo -Bar +Bar
!! end @@ -13712,6 +13752,27 @@ Accept empty attributes in th-cells !!end +!!test +Empty table rows go away +!!input +{| +| Hello +| there +|- class="foo" +|- +|} +!! result + + + + + +
Hello + there +
+ +!! end + TODO: more images more tables -- 2.20.1