jenkins-bot has submitted this change and it was merged.

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


Sync parserTests with core.

This matches upstream core commit 59e8147b67f2d9b3d6db6132917b27ea2463e8aa.

Bare protocols are no longer autolinked (T105697).  Parsoid has not been
updated to match core yet (T106945), so this newly-added parser test goes
on the blacklist for now.

Change-Id: I4a6ba328fa8d7a9860203417e41a1c7e7c5a4fb0
---
M tests/fetch-parserTests.txt.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 25 insertions(+), 2 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index 430f9d1..e163efd 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/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 = "2561c5b800e5b029c5e3e301b5d5e0a54216ae60";
+var expectedSHA1 = "6318a631297f9fe85a3b5356d7481f10f814c5c3";
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = "eade3aedf59b8263849d07d4d2f99d237a4c93f4";
+var latestCommit = "59e8147b67f2d9b3d6db6132917b27ea2463e8aa";
 
 var fs = require('fs');
 var path = require('path');
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 5802270..d72545c 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -52,6 +52,7 @@
 add("wt2html", "4. Indent-Pre and extension tags", "<pre 
data-parsoid='{\"dsr\":[0,39,1,0]}'>a <span typeof=\"mw:Extension/gallery\" 
about=\"#mwt1\" 
data-parsoid='{\"stx\":\"html\",\"src\":\"&lt;gallery>\\nFile:foobar.jpg\\n&lt;/gallery>\",\"tagWidths\":[9,10],\"autoInsertedEnd\":true,\"dsr\":[3,39,9,0]}'>&lt;gallery>\nFile:foobar.jpg\n&lt;/gallery></span></pre>");
 add("wt2html", "6. Pre-blocks should extend across lines with leading WS even 
when there is no wrappable content", "<pre 
data-parsoid='{\"dsr\":[0,26,1,0]}'>a\n\n <!-- continue -->\nb</pre>\n\n<pre 
data-parsoid='{\"dsr\":[28,30,1,0]}'>c</pre>\n \n<p 
data-parsoid='{\"dsr\":[33,34,0,0]}'>d</p>");
 add("wt2html", "Definition Lists: colons and tables 1", "<dl 
data-parsoid='{\"dsr\":[0,21,0,0]}'><dd 
data-parsoid='{\"dsr\":[0,10,1,0]}'><table 
data-parsoid='{\"dsr\":[1,10,2,2]}'>\n<tbody 
data-parsoid='{\"dsr\":[4,8,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[4,7,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[4,7,1,0]}'> 
x</td></tr>\n</tbody></table></dd>\n<dd 
data-parsoid='{\"dsr\":[11,21,1,0]}'><table 
data-parsoid='{\"dsr\":[12,21,2,2]}'>\n<tbody 
data-parsoid='{\"dsr\":[15,19,0,0]}'><tr 
data-parsoid='{\"autoInsertedEnd\":true,\"autoInsertedStart\":true,\"dsr\":[15,18,0,0]}'><td
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[15,18,1,0]}'> 
y</td></tr>\n</tbody></table></dd></dl>");
+add("wt2html", "External links: Lone protocols are never linked (T105697)", 
"<p data-parsoid='{\"dsr\":[0,56,0,0]}'>http://\n<a rel=\"mw:ExtLink\" 
href=\"http://\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[8,15,0,0]}'>http://</a>;\n(<a 
rel=\"mw:ExtLink\" href=\"http://\"; 
data-parsoid='{\"stx\":\"url\",\"dsr\":[18,25,0,0]}'>http://</a>)\nbitcoin:\nbitcoin:;\n(bitcoin:)</p>");
 add("wt2html", "Bug 2702: Mismatched <i>, <b> and <a> tags are invalid", "<p 
data-parsoid='{\"dsr\":[0,204,0,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[0,29,2,0]}'><a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":22,\"contentOffsets\":[22,28],\"dsr\":[2,29,20,1]}'>text<i
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[26,28,2,0]}'></i></a></i>\n<a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":50,\"contentOffsets\":[50,57],\"dsr\":[30,58,20,1]}'><b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[50,57,3,0]}'>text</b></a><b 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[58,61,3,0]}'></b>\n<i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[62,106,2,0]}'>Something <a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":94,\"contentOffsets\":[94,105],\"dsr\":[74,106,20,1]}'>in
 italic<i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[103,105,2,0]}'></i></a></i>\n<i
 data-parsoid='{\"dsr\":[107,164,2,2]}'>Something <a rel=\"mw:ExtLink\" 
href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":139,\"contentOffsets\":[139,160],\"dsr\":[119,161,20,1]}'>mixed<b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[144,160,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[147,160,2,0]}'>, even 
bold</i></b></a>'</i>\n<b 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[165,204,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[168,204,2,0]}'>Now <a 
rel=\"mw:ExtLink\" href=\"http://example.com\"; 
data-parsoid='{\"targetOff\":194,\"contentOffsets\":[194,203],\"dsr\":[174,204,20,1]}'>both<b
 data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[198,203,3,0]}'><i 
data-parsoid='{\"autoInsertedEnd\":true,\"dsr\":[201,203,2,0]}'></i></b></a></i></b></p>");
 add("wt2html", "External link containing double-single-quotes in text embedded 
in italics (bug 4598 sanity check)", "<p data-parsoid='{\"dsr\":[0,60,0,0]}'><i 
data-parsoid='{\"dsr\":[0,60,2,2]}'>Some <a rel=\"mw:ExtLink\" 
href=\"http://example.com/\"; 
data-parsoid='{\"targetOff\":28,\"contentOffsets\":[28,56],\"dsr\":[7,57,21,1]}'>pretty
 <i data-parsoid='{\"dsr\":[35,46,2,2]}'>italics</i> and stuff</a>!</i></p>");
 add("wt2html", "Self-link to numeric title", "<p 
data-parsoid='{\"dsr\":[0,5,0,0]}'><a rel=\"mw:WikiLink\" href=\"./0\" 
title=\"0\" 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./0\"},\"sa\":{\"href\":\"0\"},\"dsr\":[0,5,2,2]}'>0</a></p>");
@@ -805,6 +806,7 @@
 add("html2wt", "Definition Lists: colons and tables 1", ": {|\n\n| x\n|}\n\n: 
{|\n\n| y\n|}\n");
 add("html2wt", "Definition Lists: colons and tables 2", ": {|\n\n| x\n|}\n: 
{|\n\n| y\n|}\n");
 add("html2wt", "External links: Free with trailing punctuation", 
"http://example.com,\nhttp://example.com;\nhttp://example.com\\\nhttp://example.com.\nhttp://example.com:\nhttp://example.com!\nhttp://example.com?\nhttp://example.com)\nhttp://example.com/url_with_(brackets)\n(http://example.com/url_without_brackets)\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity&nbsp;\nhttp://example.com/url_with_entity<nowiki/>&#x3C;\nhttp://example.com/url_with_entity&#x3C;\nhttp://example.com/url_with_entity&#x3C;\n";);
+add("html2wt", "External links: Lone protocols are never linked (T105697)", 
"<nowiki>http://\nhttp://;\n(http://)\nbitcoin:\nbitcoin:;\n(bitcoin:)</nowiki>\n");
 add("html2wt", "External links: URL in text", "URL in text: 
http://example.com\n";);
 add("html2wt", "External links: raw ampersand", "Old & use: http://x&y\n";);
 add("html2wt", "External links: encoded ampersand", "Old &#x26; use: 
http://x&y\n";);
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index ef939ae..ffa435c 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -4675,6 +4675,25 @@
 !! end
 
 !! test
+External links: Lone protocols are never linked (T105697)
+!! wikitext
+http://
+http://;
+(http://)
+bitcoin:
+bitcoin:;
+(bitcoin:)
+!! html
+<p>http://
+http://;
+(http://)
+bitcoin:
+bitcoin:;
+(bitcoin:)
+</p>
+!! end
+
+!! test
 External links: No preceding word characters allowed (bug 65278)
 !! wikitext
 NOPEhttp://example.com
@@ -10351,6 +10370,7 @@
 <gallery>
 File:Foobar.jpg
 </gallery>
+<!-- comment -->
 !! endarticle
 
 # hmm, fix this or just deprecate msgnw and document its behavior?
@@ -10366,6 +10386,7 @@
 &#60;gallery&#62;
 File:Foobar.jpg
 &#60;/gallery&#62;
+&#60;!-- comment --&#62;
 </p>
 !! end
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a6ba328fa8d7a9860203417e41a1c7e7c5a4fb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to