Add combined link trail / link prefix parserTests case.
authorC. Scott Ananian <cscott@cscott.net>
Tue, 30 Apr 2013 18:53:13 +0000 (14:53 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Tue, 30 Apr 2013 20:45:50 +0000 (16:45 -0400)
This protects against the bug fixed in https://gerrit.wikimedia.org/r/61512
which failed to process the rest of the paragraph after the first link
trail.

We also add more thorough test cases combining link trails, link prefixes,
and piped links.  This targets Parsoid round-tripping wikitext to wikitext
in particular.

Change-Id: I68fb3b2cec09906b19e6f833688a46b811ba9eb4

tests/parser/parserTests.txt

index 68e68a1..f38d826 100644 (file)
@@ -4264,7 +4264,7 @@ Test.
 !! endarticle
 
 !! test
-Internal link with is linkprefix
+Internal link with is link prefix
 !! options
 language=is
 !! input
@@ -4274,6 +4274,31 @@ Aðrir mótmælenda[[söfnuður|söfnuðir]] og
 </p>
 !! end
 
+!! article
+Mótmælendatrú
+!! text
+Test.
+!! endarticle
+
+!! test
+Internal link with is link trail and link prefix
+!! options
+language=is
+!! input
+[[mótmælendatrú|xxx]]ar
+[[mótmælendatrú]]ar
+mótmælenda[[söfnuður]]
+mótmælenda[[söfnuður|söfnuðir]]
+mótmælenda[[söfnuður|söfnuðir]]xxx
+!! result
+<p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
+<a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
+<a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
+</p>
+!! end
+
 !! test
 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
 !! input