Add parserTests for language converter markup.
authorC. Scott Ananian <cscott@cscott.net>
Fri, 9 Aug 2013 02:56:42 +0000 (22:56 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Fri, 16 Aug 2013 17:14:17 +0000 (13:14 -0400)
This test demonstrates a bug with image link, list item, and table cell
parsing when language converter markup is present.

The test is disabled until the bug is fixed.

Bug: 52661
Change-Id: I2da85ab6ba58639d6959f1abb41461c76b3bf177

tests/parser/parserTests.txt

index 41d49d1..984580a 100644 (file)
@@ -13982,6 +13982,64 @@ language=sr
 </p>
 !!end
 
+!! test
+Don't break link parsing if language converter markup is in the caption.
+!! options
+language=sr variant=sr-ec
+!! input
+[[Main Page|-{R|main page}-]]
+!! result
+<p><a href="/wiki/Main_Page" title="Маин Паге">main page</a>
+</p>
+!! end
+
+# This test is currently broken in the PHP parser (bug 52661)
+!! test
+Don't break image parsing if language converter markup is in the caption.
+!! options
+language=sr
+disabled
+!! input
+[[File:Foobar.jpg|-{R|caption}-]]
+!! result
+<p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
+</p>
+!! end
+
+# This test is currently broken in the PHP parser (bug 52661)
+!! test
+Don't break list handling if language converter markup is in the item.
+!! options
+language=zh variant=zh-cn
+disabled
+!! input
+;-{zh-cn:AAA;zh-tw:BBB}-
+!! result
+<dl><dt>AAA
+</dt></dl>
+
+!! end
+
+# This test is currently broken in the PHP parser (bug 52661)
+!! test
+Don't break table handling if language converter markup is in the cell.
+!! options
+language=sr variant=sr-ec
+disabled
+!! input
+{|
+|-
+| -{R|B}-
+|}
+!! result
+<table>
+
+<tr>
+<td> B
+</td></tr></table>
+
+!! end
+
 !! test
 Bug 529: Uncovered bullet
 !! input