From e34d18819fa9b0f19c8101699062ebeccb843768 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Mon, 18 Jul 2016 17:59:57 -0700 Subject: [PATCH] Sync up with Parsoid parserTests. This now aligns with Parsoid commit 36075c7fc242ad2fd7bba05661606722ebda49aa Change-Id: I5bbf1c0a1e9602983024ce30eb28a33648246b3c --- tests/parser/parserTests.txt | 48 +++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index dd506074bc..bd67258912 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -35,7 +35,7 @@ # # You can also set the following parser properties via test options: # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel, -# wgLinkHolderBatchSize, wgRawHtml +# wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic # # For testing purposes, temporary articles can created: # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle @@ -8361,6 +8361,7 @@ Blah blah blah !! end +## parsoid html2wt will lose the space variations !! test Interlanguage link with spacing !! options @@ -8391,6 +8392,7 @@ Blah blah blah !! end +## parsoid html2wt will lose the space variations !! test Interlanguage link variations !! options @@ -8410,6 +8412,7 @@ Blah blah blah !! end +## parsoid html2wt will normalize the space to _ !! test Space and question mark encoding in interlanguage links (T95473) !! options @@ -8470,6 +8473,34 @@ Blah blah blah !! end +## PHP parser tests script needs an update +## Parsoid html2wt will normalize output to [[:zh:Chinese]] +!! test +Language links render as inline links if $wgInterwikiMagic=false +!! options +wgInterwikiMagic=false +parsoid=wt2html,wt2wt,html2html +!! wikitext +Blah blah blah +[[zh:Chinese]] +!! html/parsoid +

Blah blah blah zh:Chinese

+!! end + +## PHP parser tests script needs an update +## Parsoid html2wt will normalize output to [[:zh:Chinese]] +!! test +Language links render as inline links in the Talk namespace +!! options +title=Talk:Foo +parsoid=wt2html,wt2wt,html2html +!! wikitext +Blah blah blah +[[zh:Chinese]] +!! html/parsoid +

Blah blah blah zh:Chinese

+!! end + !! test Parsoid-specific test: Wikilinks with   should RT properly !! options @@ -27065,6 +27096,21 @@ B !! end +!! test +DOMDiff: Edits to content nested in elements with templated attributes should not be lost (T139388) +!! options +parsoid={ + "modes": ["selser"], + "changes": [ + [ "div:first-child", "text", "bar" ] + ] +} +!! wikitext +
foo
+!! wikitext/edited +
bar
+!! end + !! test Empty LI (T49673) !! wikitext -- 2.20.1