From: C. Scott Ananian
Date: Sat, 23 Feb 2013 03:38:36 +0000 (-0500)
Subject: Some additional test cases for Parsoid.
X-Git-Tag: 1.31.0-rc.0~20529^2
X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=0bc78522f789c696c61006ae62b6622982cbd572;p=lhc%2Fweb%2Fwiklou.git
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
---
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
+
+
+!! end
+
+!! test
+Localized image handling (2).
+!! options
+language=es
+!! input
+[[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
+!! result
+
+
+!! end
+
+!! test
+"border", "frameless" and "class" attributes on an image.
+!! input
+[[File:Foobar.jpg|frameless|border|class=extra|caption]]
+!! result
+
+
+!! end
+
!! article
File:Barfoo.jpg
!! text
@@ -13662,7 +13702,7 @@ disabled
!! 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