# 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
#
# 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">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" title="http://example.com/" 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" title="http://www.example.com/" 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 href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-re
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP的MediaWiki Wiki 引擎.zip
共1460个文件
php:928个
sql:154个
png:97个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 14 浏览量
2023-07-21
01:32:32
上传
评论
收藏 11.74MB ZIP 举报
温馨提示
基于PHP的MediaWiki Wiki 引擎.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP的MediaWiki Wiki 引擎.zip (1460个子文件)
printutf8.c 3KB
ChangeLog 1KB
tidy.conf 413B
COPYING 18KB
COPYING 2KB
CREDITS 2KB
main.css 27KB
main.css 17KB
main.css 8KB
oldshared.css 8KB
shared.css 7KB
main.css 7KB
commonPrint.css 5KB
rtl.css 4KB
rtl.css 3KB
diff.css 3KB
cologneblue.css 3KB
feed.css 3KB
rtl.css 2KB
wikistandard.css 2KB
IE60Fixes.css 2KB
IE70Fixes.css 1KB
IE55Fixes.css 1KB
IE60Fixes.css 1KB
IE55Fixes.css 1KB
common_rtl.css 1KB
IE50Fixes.css 1KB
IE50Fixes.css 1KB
wikiprintable.css 945B
IEMacFixes.css 782B
nostalgia.css 546B
Opera7Fixes.css 394B
Opera6Fixes.css 334B
Opera9Fixes.css 205B
print.css 110B
KHTMLFixes.css 108B
FF2Fixes.css 85B
quickbar-right.css 66B
quickbar.css 45B
main.css 30B
tree.d 591B
counts.d 391B
apache-ampersand.diff 2KB
Documentation 8KB
Doxyfile 10KB
FAQ 164B
discussionitem_icon.gif 949B
discussionitem_icon.gif 949B
discussionitem_icon.gif 949B
link_icon.gif 942B
link_icon.gif 942B
link_icon.gif 942B
link_icon.gif 942B
user.gif 923B
file_icon.gif 921B
file_icon.gif 921B
file_icon.gif 921B
lock_icon.gif 918B
mail_icon.gif 918B
mail_icon.gif 918B
lock_icon.gif 918B
mail_icon.gif 918B
lock_icon.gif 918B
Zoom_sans.gif 901B
sort_up.gif 881B
sort_down.gif 879B
sort_none.gif 877B
spinner.gif 586B
diffunderline.gif 52B
bullet.gif 50B
bullet.gif 50B
bullet.gif 50B
required.gif 47B
HISTORY 362KB
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
.htaccess 14B
UtfNormalData.inc 109KB
UtfNormalDataK.inc 108KB
messages.inc 73KB
updaters.inc 64KB
parserTests.inc 40KB
FiveUpgrade.inc 38KB
checkLanguage.inc 22KB
languages.inc 21KB
messageTypes.inc 13KB
backup.inc 9KB
userDupes.inc 9KB
compressOld.inc 8KB
writeMessagesArray.inc 8KB
convertLinks.inc 8KB
rebuildrecentchanges.inc 7KB
rebuildInterwiki.inc 7KB
commandLine.inc 7KB
dumpInterwiki.inc 7KB
共 1460 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
资源评论
助力毕业
- 粉丝: 2173
- 资源: 5122
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- unity开发教程.docx
- 代码使用Pygame库实现了一个简单的烟花模拟 核心逻辑包括烟花和粒子类的定义,处理位置、爆炸、尾迹和绘制等操作
- Matlab Simulink 电力电子仿真-Flyback(反激电路)电路分析
- tudou-android-release.apk
- 数据分析教程.docx
- 基于matlab实现用有限元法计算电磁场的Matlab工具 .rar
- 基于matlab实现有限元算法 计算电磁场问题 边界条件包括第一类边界和第二类边界.rar
- 基于matlab实现用于计算不同车重下的电动汽车动力性和经济性.rar
- 基于matlab实现遗传算法求解多车场车辆路径问题 有多组算例可以用.rar
- 浏览器.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功