From cb98a3d07e030b98a3f6ba6a221550d377510461 Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Sat, 25 Sep 2004 05:58:49 +0000 Subject: [PATCH] New tests for sections and various bugs --- maintenance/parserTests.txt | 176 ++++++++++++++++++++++++++++++++++-- 1 file changed, 169 insertions(+), 7 deletions(-) diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index f68ca941ca..59a69f1841 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -12,8 +12,7 @@ # ill add inter-language links # subpage enable subpages (disabled by default) # title=[[XXX]] run test using article title XXX -# -# Tests can be disabled with the '!!disabled' flag. +# disabled do not run test # # For testing purposes, temporary articles can created: # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle @@ -413,6 +412,15 @@ http://www.jpeg.org

!! end +!! test +External links: URL within URL (original bug 2) +!! input +[http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp] +!! result +

[1] (http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp) +

+!! end + ### ### Quotes ### @@ -689,6 +697,16 @@ Piped link to namespace

!! end +!! test +Link containing } +!! input +[[Usually caused by a typo (oops}]] +!! result +

[[Usually caused by a typo (oops}]] +

+!! end + + !! test Plain link to URL !! input @@ -869,8 +887,9 @@ ISBN 0-306-40615-2 !! end ### -### Nonexistant template -### +### Templates +#### + !! test Nonexistant template !! input @@ -880,9 +899,6 @@ Nonexistant template

!! end -### -### Templates -#### !! article Template:test !! text @@ -1001,6 +1017,60 @@ Template infinite loop !! end +!! article +Template:table +!! text +{| +| 1 || 2 +|- +| 3 || 4 +|} +!! endarticle + +!! test +BUG 529: Template with table, not included at beginning of line +!! input +foo {{table}} +!! result +

foo +

+ + + + +
1 2 +
3 4 +
+ +!! end + +!! test +BUG 523: Template shouldn't eat newline (or add an extra one before table) +!! input +foo +{{table}} +!! result +

foo +

+ + + + +
1 2 +
3 4 +
+ +!! end + +!! test +BUG 41: Template parameters shown as broken links +!! input +{{{parameter}}} +!! result +

{{{parameter}}} +

+!! end + ### ### Pre-save transform tests ### @@ -1168,6 +1238,17 @@ Disabled subpages

!! end +!! test +BUG 561: {{/Subpage}} +!! options +title=[[Page]] +!! input +{{/Subpage}} +!! result +

Page/Subpage +

+!! end + ### ### Categories ### @@ -1211,6 +1292,87 @@ ill es:Alimento fr:Nourriture zh:食品 !! end +### +### Sections +### +!! test +Basic section headings +!! input +== Headline 1 == +Some text + +==Headline 2== +More +===Smaller headline=== +Blah blah +!! result +
[edit]

Headline 1

+

Some text +

+
[edit]

Headline 2

+

More +

+
[edit]

Smaller headline

+

Blah blah +

+!! end + +!! test +Section headings with TOC +!! input +== Headline 1 == +=== Subheadline 1 === +===== Skipping a level ===== +====== Skipping a level ====== + +== Headline 2 == +Some text +===Another headline=== +!! result +
+Table of contents
+ + + + +
+
[edit]

Headline 1

+
[edit]

Subheadline 1

+
[edit]
Skipping a level
+
[edit]
Skipping a level
+
[edit]

Headline 2

+

Some text +

+
[edit]

Another headline

+ +!! end + +!! test +Resolving duplicate section names +!! input +== Foo bar == +==Foo bar== +!! result +
[edit]

Foo bar

+
[edit]

Foo bar

+ +!! end TODO: more images -- 2.20.1