Add Parsoid-specific tests for link trail and -prefix escaping
authorGabriel Wicke <gwicke@wikimedia.org>
Wed, 15 May 2013 21:01:48 +0000 (14:01 -0700)
committerGabriel Wicke <gwicke@wikimedia.org>
Wed, 15 May 2013 21:08:04 +0000 (14:08 -0700)
This is intended to test the escaping code developed in I627dd609d4eb0. The
link prefix code does not pass yet, possibly because of some bug in
language-specific tests or our local islandic language config.

Change-Id: I53289110e3f9e4f840b2f45594e819c9655a17b4

tests/parser/parserTests.txt

index f90b279..05e935b 100644 (file)
@@ -4333,6 +4333,27 @@ mótmælenda[[söfnuður|söfnuðir]]xxx
 </p>
 !! end
 
+!! test
+Parsoid link trail escaping
+!! options
+parsoid=html2wt,html2html
+!! input
+[[apple]]<nowiki/>s
+!! result
+<p><a rel="mw:WikiLink" href="Apple">apple</a>s</p>
+!! end
+
+!! test
+Parsoid link prefix escaping
+!! options
+language=is
+parsoid=html2wt,html2html
+!! input
+Aðrir mótmælenda<nowiki/>[[söfnuður]]
+!! result
+<p>Aðrir mótmælenda<a rel="mw:WikiLink" href="Söfnuður">söfnuður</a></p>
+!! end
+
 !! test
 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
 !! input