Sujet sur Discussion utilisateur:Tpt

Candalua (discussioncontributions)

Hi Tpt! I'm trying to implement a parser test for T104566, but I'm not able to make it work. I added the following code to the test file and created a new file TestSeparator.djvu under tests/data/media/. But when I run it, the actual output from the parser is just "<div></div>". What am I missing here? Thank you for your help.

!!article
Index:TestSeparator.djvu
!!text
{{:MediaWiki:Proofreadpage_index_template
|Title=TestSeparator
|Pages=<pagelist from=1 to=4 />
|Author=[[Author:Me]]
}}
!!endarticle

!!article
Page:TestSeparator.djvu/1
!!text
The first page must be connect-
!!endarticle

!!article
Page:TestSeparator.djvu/2
!!text
ed with the second
!!endarticle

!!article
Page:TestSeparator.djvu/3
!!text
but the third and
!!endarticle

!!article
Page:TestSeparator.djvu/4
!!text
the fourth does not.
!!endarticle

!! test
pages: with hyphenated word across pages
!! options
djvu
title=TestSeparator
!! wikitext
<pages index="TestSeparator.djvu" from=1 to=4 />
!! html
<div>
<p><span><a href="/wiki/Page:TestSeparator.djvu/1" title="Page:TestSeparator.djvu/1">1</a></span>The first page must be connect<span><a href="/wiki/Page:TestSeparator.djvu/2" title="Page:TestSeparator.djvu/2">2</a></span>ed with the second <span><a href="/wiki/Page:TestSeparator.djvu/3" title="Page:TestSeparator.djvu/3">3</a></span>but the third and <span><a href="/wiki/Page:TestSeparator.djvu/4" title="Page:TestSeparator.djvu/4">4</a></span>the fourth does not.
</p>
</div>

!! end
Tpt (discussioncontributions)
Candalua (discussioncontributions)

Oh my...! What a bad, bad thing. I suppose then that the only way is to add some pages to the existing LoremIpsum.djvu?

Tpt (discussioncontributions)

To test T104566 you could maybe just add some parser tests using an index pages not based on a .djvu files but on a set of specific Page: pages (without even having to make sure that images with the page name exists). It should do the work.

Répondre à « Help for parser test »