C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334171 )

Change subject: Sync parserTests with core.
......................................................................

Sync parserTests with core.

Change-Id: I09b794af5a8eb83b99f90f128f1c67efabec8576
---
M tests/parserTests.txt
M tools/fetch-parserTests.txt.js
2 files changed, 61 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/71/334171/1

diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 52209d2..cc202ac 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -8600,6 +8600,22 @@
 <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Foo_bar"; />
 !! end
 
+!! test
+Escaping of interlanguage links
+!! wikitext
+Blah blah blah
+[[:es:Spanish]]
+[[ : zh : Chinese ]]
+!! html/php
+<p>Blah blah blah
+<a href="http://es.wikipedia.org/wiki/Spanish"; class="extiw" 
title="es:Spanish">es:Spanish</a>
+<a href="http://zh.wikipedia.org/wiki/Chinese"; class="extiw" 
title="zh:Chinese"> zh : Chinese </a>
+</p>
+!! html/parsoid
+<p><a rel="mw:ExtLink" href="http://es.wikipedia.org/wiki/Spanish"; 
title="es:Spanish">es:Spanish</a>
+<a rel="mw:ExtLink" href="http://zh.wikipedia.org/wiki/Chinese"; 
title="zh:Chinese"> zh : Chinese </a></p>
+!! end
+
 ## parsoid html2wt will normalize the space to _
 !! test
 Space and question mark encoding in interlanguage links (T95473)
@@ -10296,6 +10312,26 @@
 {{SITENAME}}
 !! html
 <p>MediaWiki
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGELANGUAGE}}
+!! options
+language=fr
+!! wikitext
+{{PAGELANGUAGE}}
+!! html
+<p>fr
+</p>
+!! end
+
+!! test
+Magic Word: {{PAGELANGUAGE}} on a page with no explicitly set language
+!! wikitext
+{{PAGELANGUAGE}}
+!! html
+<p>en
 </p>
 !! end
 
@@ -16057,7 +16093,7 @@
 !! wikitext
 <div title="{}">Foo</div>
 !! html/php
-<div title="&#123;}">Foo</div>
+<div title="&#123;&#125;">Foo</div>
 
 !! html/parsoid
 <div title="{}">Foo</div>
@@ -20678,6 +20714,28 @@
 # [http://example.com http://example.com] will not RT back to that
 # form anymore.
 !! test
+HTML markups with conversion syntax in attribs, nested in other conversion 
blocks
+!! options
+language=zh variant=zh-cn
+!! wikitext
+-{zh;zh-hans;zh-hant|<span title="-{X}-">A</span>}-
+!! html
+<p><span title="X">A</span>
+</p>
+!! end
+
+!! test
+HTML markups with conversion syntax in attribs, nested in other conversion 
blocks (not working yet)
+!! options
+language=zh variant=zh-cn disabled
+!! wikitext
+-{<span title="-{X}-">A</span>}-
+!! html
+<p><span title="X">A</span>
+</p>
+!! end
+
+!! test
 Proper conversion of text in external links
 !! options
 language=sr variant=sr-ec
diff --git a/tools/fetch-parserTests.txt.js b/tools/fetch-parserTests.txt.js
index f801139..90f971d 100755
--- a/tools/fetch-parserTests.txt.js
+++ b/tools/fetch-parserTests.txt.js
@@ -12,9 +12,9 @@
 //     and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = "d358d2a1401d9d9ba06099d1f8862282acf00b87";
+var expectedSHA1 = "e356e32b279671d5c662aa4409d64425c14adb6f";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "6b97c822726c98f9b3cbc821e631dc18e52489d2";
+var latestCommit = "4a07505402a56a32be23a570f4bd1fe33dd542a9";
 
 var fs = require('fs');
 var path = require('path');

-- 
To view, visit https://gerrit.wikimedia.org/r/334171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09b794af5a8eb83b99f90f128f1c67efabec8576
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to