r84895 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84894‎ | r84895 | r84896 >
Date:03:57, 28 March 2011
Author:dantman
Status:ok
Tags:
Comment:
Followup r79639, add a new parser test for gallery items not using a namespace prefix.
Modified paths:
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parser/parserTests.txt
@@ -6835,6 +6835,41 @@
68366836 !! end
68376837
68386838 !! test
 6839+Gallery (with namespace-less filenames)
 6840+!! input
 6841+<gallery>
 6842+File:Nonexistant.jpg
 6843+Nonexistant.jpg
 6844+image:foobar.jpg
 6845+foobar.jpg
 6846+</gallery>
 6847+!! result
 6848+<ul class="gallery">
 6849+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
 6850+ <div style="height: 150px;">Nonexistant.jpg</div>
 6851+ <div class="gallerytext">
 6852+ </div>
 6853+ </div></li>
 6854+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
 6855+ <div style="height: 150px;">Nonexistant.jpg</div>
 6856+ <div class="gallerytext">
 6857+ </div>
 6858+ </div></li>
 6859+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
 6860+ <div class="thumb" style="width: 150px;"><div style="margin:66px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div>
 6861+ <div class="gallerytext">
 6862+ </div>
 6863+ </div></li>
 6864+ <li class="gallerybox" style="width: 155px"><div style="width: 155px">
 6865+ <div class="thumb" style="width: 150px;"><div style="margin:66px auto;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div>
 6866+ <div class="gallerytext">
 6867+ </div>
 6868+ </div></li>
 6869+</ul>
 6870+
 6871+!! end
 6872+
 6873+!! test
68396874 HTML Hex character encoding (spells the word "JavaScript")
68406875 !! input
68416876 &#x4A;&#x061;&#x0076;&#x00061;&#x000053;&#x0000063;&#114;&#x0000069;&#00000112;&#x0000000074;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79639Allow filenames to be specified in a <gallery> with the File:, Image: or medi...dantman06:16, 5 January 2011

Status & tagging log