# MediaWiki Parser test cases
# Some taken from https://meta.wikimedia.org/wiki/Parser_testing
# All (C) their respective authors and released under the GPL
#
# The syntax should be fairly self-explanatory.
#
# Currently supported test options:
# One of the following three:
#
# (default) generate HTML output
# pst apply pre-save transform
# msg apply message transform
#
# Plus any combination of these:
#
# cat add category links
# (ignored by Parsoid, since it emits <link>s)
# ill add inter-language links
# (ignored by Parsoid, since it emits <link>s)
# subpage enable subpages (disabled by default)
# title=[[XXX]] run test using article title XXX
# language=XXX set content language to XXX for this test
# variant=XXX set the variant of language for this test (eg zh-tw)
# disabled do not run test
# parsoid parsoid-specific options (not run by PHP parser unless
# the test includes an html/php section)
# php php-only test (not run by the parsoid parser unless
# the test includes an html/parsoid section)
# showtitle make the first line the title
# showindicators make the first lines the page status indicators
# comment run through Linker::formatComment() instead of main parser
# local format section links in edit comment text as local links
# notoc disable table of contents
# thumbsize=NNN set the default thumb size to NNNpx for this test
# wrap include the normal wrapper <div class="mw-parser-output"> (since 1.30)
#
# You can also set the following parser properties via test options:
# wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
# wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic,
# wgEnableMagicLinks
#
# For testing purposes, temporary articles can created:
# !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
# where '/' denotes a newline.
# This is the standard article assumed to exist.
!! article
Main Page
!! text
blah blah
!! endarticle
!!article
Foo
!!text
FOO
!!endarticle
!!article
Template:Foo
!!text
FOO
!!endarticle
!! article
Template:Blank
!! text
!! endarticle
!! article
Template:pipe
!! text
|
!! endarticle
!! article
Template:=
!! text
<nowiki>=</nowiki>
!! endarticle
!!article
MediaWiki:bad image list
!!text
* [[File:Bad.jpg]] except [[Nasty page]]
!!endarticle
!! article
Template:inner list
!! text
* item 1
!! endarticle
!! article
Template:tbl-start
!! text
{|
!! endarticle
!! article
Template:tbl-end
!! text
|}
!! endarticle
!! article
Template:echo
!! text
{{{1}}}
!! endarticle
// For Serbian; localize Template namespace
!! article
Шаблон:Echo
!! text
{{{1}}}
!! endarticle
!! article
Template:echo_with_span
!! text
<span>{{{1}}}</span>
!! endarticle
!! article
Template:echo_with_div
!! text
<div>{{{1}}}</div>
!! endarticle
!! article
Template:blank_param
!! text
{{{1}}}
{{{}}}
!! endarticle
!! article
Template:table_attribs
!! text
<noinclude>
|</noinclude>style="color:red;"|Foo
!! endarticle
!! article
Template:table_attribs_2
!! text
<noinclude>
|</noinclude>style="color:red;"|Foo
|Bar||Baz
!! endarticle
!! article
Template:table_attribs_3
!! text
<noinclude>
|</noinclude>style{{=}}"background:#f9f9f9;"|Foo
!! endarticle
!! article
Template:table_attribs_4
!! text
| style="background-color:#DC241f;" width="10px" |
!! endarticle
!! article
Template:table_attribs_5
!! text
<noinclude>
|</noinclude>style="color:red;"||Bar
!! endarticle
!! article
Template:table_attribs_6
!! text
style="background: <nowiki>
red;</nowiki>" |
!! endarticle
!! article
Template:table_attribs_7
!! text
<noinclude>
|</noinclude>style{{=}}"background:#f9f9f9;"|Foo<ref>foo</ref>
!! endarticle
!! article
Template:table_header_cells
!! text
{{table_attribs}}!!style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
!! endarticle
!! article
Template:table_cells
!! text
{{table_attribs}}||style='color:red;'|''Bar''||style='color:brown;'|''Foo'' and Baz
!! endarticle
!! article
Template:PartialTable
!! text
{|
|-
!! endarticle
!! article
Template:image_attribs
!! text
<noinclude>
[[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
!! endarticle
## See T48811 for details
!! article
Template:mixed_attr_content_template
!! text
style="color:red;" title="T48811"
|-
|foo
!! endarticle
!! article
Template:definition_list
!! text
one
::two
!! endarticle
!! article
A?b
!! text
Weirdo titles!
!! endarticle
!!article
Template:Bullet
!!text
* Bar
!!endarticle
!!article
Template:OpenTable
!!text
{|
!!endarticle
!!article
Template:EmptyLITest
!!text
*a
*
*
*b
!!endarticle
!!article
Template:EmptyTRTest
!!text
{|
|-
|-
|foo
|-
|-
|bar
|}
!!endarticle
!!article
Template:EmptyTRWithHTMLAttrTest
!!text
<table>
<tr align="center"></tr>
<tr><td>foo</td></tr>
<tr align="center"></tr>
<tr><td>bar</td></tr>
</table>
!!endarticle
!! article
Template:CircularRef
!! text
<ref>{{CircularRef}}</ref>
!! endarticle
!! article
Template:With: Colon
!! text
Template with colon
!! endarticle
###
### Basic tests
###
!! test
Blank input
!! wikitext
!! html
!! end
!! test
CircularRef
!! wikitext
{{CircularRef}}
<references />
!! html/parsoid
<p><span about="#mwt1" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Transclusion mw:Extension/ref" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"CircularRef","href":"./Template:CircularRef"},"params":{},"i":0}}]}'><a href="./Main_Page#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span></p>
<ol class="mw-references references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1"><a href="./Main_Page#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text" data-parsoid="{}">Error: Expansion loop detected at <a data-parsoid='{"a":{"href":null},"sa":{"href":"Template:CircularRef"}}'>Template:CircularRef</a></span></li></ol>
!! end
!! test
Simple paragraph
!! wikitext
This is a simple paragraph.
!! html
<p>This is a simple paragraph.
</p>
!! end
!! test
Paragraphs with extra newline spacing
!! wikitext
foo
bar
baz
booz
!! html
<p>foo
</p><p>bar
</p><p><br />
baz
</p><p><br />
</p><p>booz
</p>
!! end
!! test
Paragraphs with newline spacing with comment lines in between
!! wikitext
----
a
<!--foo-->
b
----
a
<!--foo--><!--More than 1 comment, still stripped-->
b
----
a
<!--foo--> <!----> <!-- bar -->
b
----
a
<!--foo-->
b
----
a
<!--foo-->
b
----
a
<!--foo-->
b
----
a
<!--foo-->
b
----
!! html
<hr />
<p>a
b
</p>
<hr />
<p>a
b
</p>
<hr />
<p>a
b
</p>
<hr />
<p>a
</p><p>b
</p>
<hr />
<p>a
</p><p>b
</p>
<hr />
<p>a
</p><p><br />
b
</p>
<hr />
<p>a
</p><p><br />
b
</p>
<hr />
!! end
!! test
Paragraphs with newline spacing with non-empty white-space lines in between
!! wikitext
----
a
b
----
a
b
----
!! html
<hr />
<p>a
</p><p>b
</p>
<hr />
<p>a
</p><p><br />
b
</p>
<hr />
!! end
!! test
Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
!! wikitext
----
a
<!--foo-->
b
----
a
<!--foo--><!--More than 1 comment doesn't disable stripping of this line!-->
b
----
a
<!--foo-->
<!--bar-->
b
----
a
<!--foo-->
<!--bar-->
b
----
!! html
<hr />
<p>a
b
</p>
<hr />
<p>a
b
</p>
<hr />
<p>a
</p><p>b
</p>
<hr />
<p>a
</p><p><br />
b
</p>
<hr />
!! end
!! test
Extra newlines: More paragraphs with indented comment
!! wikitext
a
<!--boo-->
b
!! html
<p>a
</p><p><br />
b
</p>
!!end
!! test
Extra newlines followed by heading
!! wikitext
a
=b=
[[a]]
=b=
!! html
<p>a
</p><p><br />
</p>
<h1><span class="mw-headline" id="b">b</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" titl
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
mediawiki-1.30.0.tar.gz (2000个子文件)
pimple.c 29KB
oojs-ui-core-wikimediaui.css 68KB
oojs-ui-core-apex.css 47KB
oojs-ui-widgets-wikimediaui.css 40KB
oojs-ui-widgets-apex.css 34KB
oojs-ui-toolbars-apex.css 20KB
oojs-ui-toolbars-wikimediaui.css 19KB
jquery.ui.theme.css 17KB
jquery.ui.theme.css 17KB
shared.css 16KB
chosen.css 15KB
oojs-ui-windows-wikimediaui.css 15KB
jquery.ui.button.css 13KB
main.css 13KB
oojs-ui-windows-apex.css 12KB
main.css 10KB
demo.css 10KB
qunit.css 8KB
oldshared.css 7KB
commonPrint.css 6KB
content.css 6KB
pygments.generated.css 5KB
screen.css 4KB
gallery.css 4KB
jquery.ui.datepicker.css 4KB
jquery.ui.datepicker.css 4KB
elements.css 3KB
content.externallinks.css 3KB
config.css 3KB
mediawiki.special.search.styles.css 3KB
ve.ui.MWReferenceIcons.css 3KB
jquery.ui.button.css 2KB
ext.cite.style.css 2KB
getid3.css 2KB
mediawiki.special.css 2KB
mw.widgets.MediaResultWidget.css 2KB
mediawiki.hlist.css 2KB
jquery.ui.dialog.css 2KB
mediawiki.special.apisandbox.css 2KB
IE70Fixes.css 2KB
IE60Fixes.css 2KB
mediawiki.diff.styles.css 2KB
docutils.css 2KB
mediawiki.action.view.redirectPage.css 2KB
mediawiki.special.userlogin.common.css 2KB
mediawiki.special.userlogin.signup.css 2KB
mediawiki.action.view.filepage.css 2KB
mediawiki.apihelp.css 2KB
pygments.wrapper.css 2KB
interface.css 2KB
jquery.tipsy.css 2KB
mediawiki.special.changeslist.enhanced.css 1KB
jquery.farbtastic.css 1KB
jquery.ui.core.css 1KB
jquery.ui.core.css 1KB
jquery.ui.dialog.css 1KB
jquery.makeCollapsible.css 1KB
jquery.ui.tabs.css 1KB
jquery.ui.tabs.css 1KB
styles.css 1KB
jquery.ui.menu.css 1KB
jquery.ui.menu.css 1KB
jquery.ui.resizable.css 1KB
jquery.suggestions.css 1KB
mediawiki.notification.css 1KB
jquery.ui.resizable.css 1KB
jquery.ui.slider.css 1KB
jquery.ui.slider.css 1KB
jquery.ui.spinner.css 1KB
jquery.ui.spinner.css 1KB
ooui.styles.css 1KB
ext.cite.styles.css 1KB
PositionSelectWidget.css 1KB
mediawiki.special.preferences.styles.css 1009B
Interwiki.css 966B
ext.confirmEdit.fancyCaptcha.css 908B
jquery.spinner.css 882B
mediawiki.feedback.css 868B
SimpleWidget.css 858B
mw.widgets.ComplexNamespaceInputWidget.base.css 843B
jquery.ui.accordion.css 807B
jquery.ui.accordion.css 807B
mediawiki.searchSuggest.css 800B
config-cc.css 798B
mediawiki.special.changeslist.css 798B
jquery.confirmable.css 770B
ve.ce.MWReferenceNode.css 716B
mediawiki.Upload.BookletLayout.css 711B
ext.cite.a11y.css 702B
mediawiki.special.userlogin.login.css 671B
jquery.badge.css 641B
ve.ui.MWSyntaxHighlightDialog.css 600B
ve.ui.MWReferenceResultWidget.css 588B
mediawiki.feedlink.css 573B
mw.widgets.ComplexTitleInputWidget.base.css 557B
ext.cite.style.fa.css 521B
mw.widgets.SelectWithInputWidget.base.css 521B
mediawiki.special.changeslist.legend.css 520B
jquery.ui.tooltip.css 503B
jquery.ui.tooltip.css 503B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- yhh3458145092018-06-26不能用,直接报错了
- 雨中超人2018-03-15这个可以升级使用吗。
minima
- 粉丝: 3
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功