# MediaWiki Parser test cases
# Some taken from http://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
# ill add inter-language links
# subpage enable subpages (disabled by default)
# noxml don't check for XML well formdness
# 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
# showtitle make the first line the title
# comment run through Linker::formatComment() instead of main parser
# local format section links in edit comment text as local links
#
# 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
Template:Foo
!!text
FOO
!!endarticle
!! article
Template:Blank
!! text
!! endarticle
!! article
Template:!
!! text
|
!! endarticle
###
### Basic tests
###
!! test
Blank input
!! input
!! result
!! end
!! test
Simple paragraph
!! input
This is a simple paragraph.
!! result
<p>This is a simple paragraph.
</p>
!! end
!! test
Simple list
!! input
* Item 1
* Item 2
!! result
<ul><li> Item 1
</li><li> Item 2
</li></ul>
!! end
!! test
Italics and bold
!! input
* plain
* plain''italic''plain
* plain''italic''plain''italic''plain
* plain'''bold'''plain
* plain'''bold'''plain'''bold'''plain
* plain''italic''plain'''bold'''plain
* plain'''bold'''plain''italic''plain
* plain''italic'''bold-italic'''italic''plain
* plain'''bold''bold-italic''bold'''plain
* plain'''''bold-italic'''italic''plain
* plain'''''bold-italic''bold'''plain
* plain''italic'''bold-italic'''''plain
* plain'''bold''bold-italic'''''plain
* plain l'''italic''plain
* plain l''''bold''' plain
!! result
<ul><li> plain
</li><li> plain<i>italic</i>plain
</li><li> plain<i>italic</i>plain<i>italic</i>plain
</li><li> plain<b>bold</b>plain
</li><li> plain<b>bold</b>plain<b>bold</b>plain
</li><li> plain<i>italic</i>plain<b>bold</b>plain
</li><li> plain<b>bold</b>plain<i>italic</i>plain
</li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
</li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
</li><li> plain<i><b>bold-italic</b>italic</i>plain
</li><li> plain<b><i>bold-italic</i>bold</b>plain
</li><li> plain<i>italic<b>bold-italic</b></i>plain
</li><li> plain<b>bold<i>bold-italic</i></b>plain
</li><li> plain l'<i>italic</i>plain
</li><li> plain l'<b>bold</b> plain
</li></ul>
!! end
###
### <nowiki> test cases
###
!! test
<nowiki> unordered list
!! input
<nowiki>* This is not an unordered list item.</nowiki>
!! result
<p>* This is not an unordered list item.
</p>
!! end
!! test
<nowiki> spacing
!! input
<nowiki>Lorem ipsum dolor
sed abit.
sed nullum.
:and a colon
</nowiki>
!! result
<p>Lorem ipsum dolor
sed abit.
sed nullum.
:and a colon
</p>
!! end
!! test
nowiki 3
!! input
:There is not nowiki.
:There is <nowiki>nowiki</nowiki>.
#There is not nowiki.
#There is <nowiki>nowiki</nowiki>.
*There is not nowiki.
*There is <nowiki>nowiki</nowiki>.
!! result
<dl><dd>There is not nowiki.
</dd><dd>There is nowiki.
</dd></dl>
<ol><li>There is not nowiki.
</li><li>There is nowiki.
</li></ol>
<ul><li>There is not nowiki.
</li><li>There is nowiki.
</li></ul>
!! end
###
### Comments
###
!! test
Comment test 1
!! input
<!-- comment 1 --> asdf
<!-- comment 2 -->
!! result
<pre>asdf
</pre>
!! end
!! test
Comment test 2
!! input
asdf
<!-- comment 1 -->
jkl
!! result
<p>asdf
jkl
</p>
!! end
!! test
Comment test 3
!! input
asdf
<!-- comment 1 -->
<!-- comment 2 -->
jkl
!! result
<p>asdf
jkl
</p>
!! end
!! test
Comment test 4
!! input
asdf<!-- comment 1 -->jkl
!! result
<p>asdfjkl
</p>
!! end
!! test
Comment spacing
!! input
a
<!-- foo --> b <!-- bar -->
c
!! result
<p>a
</p>
<pre> b
</pre>
<p>c
</p>
!! end
!! test
Comment whitespace
!! input
<!-- returns a single newline, not nothing, since the newline after > is not stripped -->
!! result
!! end
!! test
Comment semantics and delimiters
!! input
<!-- --><!----><!-----><!------>
!! result
!! end
!! test
Comment semantics and delimiters, redux
!! input
<!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
-- foo -- funky huh? ... -->
!! result
!! end
!! test
Comment semantics and delimiters: directors cut
!! input
<!-- ... However we like to keep things simple and somewhat XML-ish so we eat
everything starting with < followed by !-- until the first -- and > we see,
that wouldn't be valid XML however, since in XML -- has to terminate a comment
-->-->
!! result
<p>-->
</p>
!! end
!! test
Comment semantics: nesting
!! input
<!--<!-- no, we're not going to do anything fancy here -->-->
!! result
<p>-->
</p>
!! end
!! test
Comment semantics: unclosed comment at end
!! input
<!--This comment will run out to the end of the document
!! result
!! end
!! test
Comment in template title
!! input
{{f<!---->oo}}
!! result
<p>FOO
</p>
!! end
!! test
Comment on its own line post-expand
!! input
a
{{blank}}<!---->
b
!! result
<p>a
</p><p>b
</p>
!! end
###
### Preformatted text
###
!! test
Preformatted text
!! input
This is some
Preformatted text
With ''italic''
And '''bold'''
And a [[Main Page|link]]
!! result
<pre>This is some
Preformatted text
With <i>italic</i>
And <b>bold</b>
And a <a href="/wiki/Main_Page" title="Main Page">link</a>
</pre>
!! end
!! test
<pre> with <nowiki> inside (compatibility with 1.6 and earlier)
!! input
<pre><nowiki>
<b>
<cite>
<em>
</nowiki></pre>
!! result
<pre>
<b>
<cite>
<em>
</pre>
!! end
!! test
Regression with preformatted in <center>
!! input
<center>
Blah
</center>
!! result
<center>
<pre>Blah
</pre>
</center>
!! end
!! test
<pre> with attributes (bug 3202)
!! input
<pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
!! result
<pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
!! end
!! test
<pre> with width attribute (bug 3202)
!! input
<pre width="8">Narrow screen goodies</pre>
!! result
<pre width="8">Narrow screen goodies</pre>
!! end
!! test
<pre> with forbidden attribute (bug 3202)
!! input
<pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
!! result
<pre width="8">Narrow screen goodies</pre>
!! end
!! test
<pre> with forbidden attribute values (bug 3202)
!! input
<pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
!! result
<pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
!! end
###
### Definition lists
###
!! test
Simple definition
!! input
; name : Definition
!! result
<dl><dt> name </dt><dd> Definition
</dd></dl>
!! end
!! test
Definition list for indentation only
!! input
: Indented text
!! result
<dl><dd> Indented text
</dd></dl>
!! end
!! test
Definition list with no space
!! input
;name:Definition
!! result
<dl><dt>name</dt><dd>Definition
</dd></dl>
!!end
!! test
Definition list with URL link
!! input
; http://example.com/ : definition
!! result
<dl><dt> <a href="http://example.com/" class="external free" rel="nofollow">http://example.com/</a> </dt><dd> definition
</dd></dl>
!! end
!! test
Definition list with bracketed URL link
!! input
;[http://www.example.com/ Example]:Something about it
!! result
<dl><dt><a href="http://www.example.com/" class="external text" rel="nofollow">Example</a></dt><dd>Something about it
</dd></dl>
!! end
!! test
Definition list with wikilink containing colon
!! input
; [[Help:FAQ]]: The least-read page on Wikipedia
!! result
<dl><dt> <a hr
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共1588个文件
php:1006个
sql:176个
png:145个
MediaWiki 是一套以GPL授权发行的Wiki引擎。它具有很丰富的功能,并被维基百科及其他维基媒体基金会的计划所采用,亦为世界上很多不同的维基所采用。 MediaWiki采用 PHP语言写成,并以MySQL作为其资料库。它的徽标图像化了它如何运用标记语言即双括号 ("","") 来连结不同的文章。MediaWiki具有很高的相容性和可塑性,现在的版本支持memcached及Squid cache系统,亦支持TeX数学公式。其扩展系统允许用户自行添加他们需要的特性及客制化程式介面。
资源推荐
资源详情
资源评论
收起资源包目录
知识管理Mediawiki (1588个子文件)
printutf8.c 3KB
ChangeLog 790B
tidy.conf 413B
COPYING 18KB
COPYING 2KB
COPYING 582B
CREDITS 2KB
main.css 23KB
main-rtl.css 21KB
main-ltr.css 21KB
shared.css 15KB
main.css 15KB
main.css 7KB
oldshared.css 7KB
new-tabs.css 7KB
main.css 6KB
commonPrint.css 4KB
rtl.css 4KB
rtl.css 3KB
diff.css 3KB
cologneblue.css 3KB
feed.css 3KB
rtl.css 2KB
babaco-colors-a.css 2KB
wikistandard.css 2KB
babaco-colors-c.css 2KB
IE60Fixes.css 2KB
IE70Fixes.css 1KB
IE55Fixes.css 1KB
common_rtl.css 1KB
IE60Fixes.css 1KB
IE55Fixes.css 1KB
IE50Fixes.css 1KB
IE50Fixes.css 1KB
babaco-colors-b.css 1KB
wikiprintable.css 945B
nostalgia.css 546B
IE80Fixes.css 532B
Opera7Fixes.css 394B
Opera6Fixes.css 334B
Opera9Fixes.css 205B
print.css 110B
FF2Fixes.css 85B
quickbar-right.css 66B
quickbar.css 45B
main.css 30B
tree.d 591B
counts.d 391B
Documentation 8KB
Doxyfile 11KB
FAQ 76B
spinner.gif 5KB
ajax-loader.gif 3KB
lock_icon.gif 918B
Zoom_sans.gif 901B
watch-icon-loading.gif 840B
discussionitem_icon.gif 549B
discussionitem_icon.gif 549B
discussionitem_icon.gif 549B
sort_up.gif 466B
sort_down.gif 464B
sort_none.gif 462B
link_icon.gif 342B
link_icon.gif 342B
link_icon.gif 342B
link_icon.gif 342B
user.gif 325B
file_icon.gif 323B
file_icon.gif 323B
file_icon.gif 323B
mail_icon.gif 321B
lock_icon.gif 321B
lock_icon.gif 321B
mail_icon.gif 321B
mail_icon.gif 321B
diffunderline.gif 52B
bullet.gif 50B
bullet.gif 50B
bullet.gif 50B
required.gif 47B
HISTORY 383KB
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
csshover.htc 9KB
UtfNormalData.inc 111KB
UtfNormalDataK.inc 110KB
messages.inc 76KB
updaters.inc 71KB
parserTests.inc 47KB
FiveUpgrade.inc 38KB
checkLanguage.inc 23KB
languages.inc 21KB
messageTypes.inc 14KB
backup.inc 9KB
userDupes.inc 9KB
共 1588 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
- leonzhaomy2012-07-13mediawiki真是套不错的系统 可以充分满足知识管理系统的需要 目前正在用
moon&sean
- 粉丝: 49
- 资源: 51
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功