X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=e6d6c2ccbbb107ff8c7806d1ae762bf021f4d764;hb=b759452d8f63a1c7246c84901e9d852482b7e3bb;hp=8aac86ddf7407defc4e12bb0ec064ae07a5548d0;hpb=999af3001062ebbed5a9909976bdeed26084fe80;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 8aac86ddf7..e6d6c2ccbb 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -785,6 +785,24 @@ x
foo
z !! end +!! test +Empty lines between block tags to test open p-tags are closed between the block tags +!! input +
+ + +
a + +b +!! result +
+


+

+
a +

b +

+!! end + ### ### Preformatted text ### @@ -1207,6 +1225,23 @@ c !!end +!!test +2c. Indent-Pre and tables (bug 42252) +!!input +{| + |+ foo + ! | bar +|} +!!result + + + +
foo +
bar +
+ +!!end + !!test 3a. Indent-Pre and block tags (single-line html) !!input @@ -1291,6 +1326,20 @@ c !!end +!! test +5. White-space in indent-pre +NOTE: the white-space char on 2nd line is significant +!! input + a
+ + b +!! result +
a
+ +b +
+!! end + ### ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric) ### @@ -2724,6 +2773,45 @@ A table with nothing but a caption !! end +!! test +A table with caption with default-spaced attributes and a table row +!! input +{| +|+ style="color: red;" | caption1 +|- +| foo +|} +!! result + + + +
caption1 +
foo +
+ +!! end + +!! test +A table with captions with non-default spaced attributes and a table row +!! input +{| +|+style="color: red;"|caption2 +|+ style="color: red;"| caption3 +|- +| foo +|} +!! result + + + + +
caption2 + caption3 +
foo +
+ +!! end + !! test Table td-cell syntax variations !! input @@ -3232,6 +3320,28 @@ Link with suffix

!! end +!! article +prefixed article +!! text +Some text +!! endarticle + +!! test +Bug 43661: Piped links with identical prefixes +!! input +[[prefixed article|prefixed articles with spaces]] + +[[prefixed article|prefixed articlesaoeu]] + +[[Main Page|Main Page test]] +!! result +

prefixed articles with spaces +

prefixed articlesaoeu +

Main Page test +

+!! end + + !! test Link with HTML entity in suffix / tail !! input @@ -3602,6 +3712,24 @@ language=kaa

!! end +!! test +Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved +!! input +[[Foo| bar]] + +[[Foo| ''bar'']] + +[http://wp.org foo] + +[http://wp.org ''foo''] +!! result +

bar +

bar +

foo +

foo +

+!! end + ### ### Interwiki links (see maintenance/interwiki.sql) ### @@ -4098,6 +4226,20 @@ disabled !! end +!! test +Unclosed formatting tags that straddle lists are closed and reopened +(Disabled since php parser generates broken html -- relies on Tidy to fix up) +!! options +disabled +!! input +# a +# b +!! result +
  1. a +
  2. b +
+!! end + !! test List items are not parsed correctly following a
 block (bug 785)
 !! input
@@ -4587,7 +4729,7 @@ Magic links: RFC (bug 479)
 !! input
 RFC 822
 !! result
-

RFC 822 +

RFC 822

!! end @@ -4605,7 +4747,7 @@ Magic links: PMID incorrectly converts space to underscore !! input PMID 1234 !! result -

PMID 1234 +

PMID 1234

!! end @@ -4912,8 +5054,14 @@ Main Page Template as link source !! input [[{{linktest2}}]] + +[[{{linktest2}}|Main Page]] + +[[{{linktest2}}]]Page !! result

Main Page +

Main Page +

Main PagePage

!! end @@ -5427,8 +5575,23 @@ Templates: Links: 2. Generation of link href Templates: Links: 3. Generation of part of a link href !!input [[Fo{{echo|o}}|bar]] + +[[Foo{{echo|bar}}]] + +[[Foo{{echo|bar}}baz]] + +[[Foo{{echo|bar}}|bar]] + +[[:Foo{{echo|bar}}]] + +[[:Foo{{echo|bar}}|bar]] !!result

bar +

Foobar +

Foobarbaz +

bar +

Foobar +

bar

!!end @@ -6744,7 +6907,7 @@ BUG 1887: A RFC with a thumbnail !! input [[Image:foobar.jpg|thumb|This is RFC 12354]] !! result -
This is RFC 12354
+
This is RFC 12354
!! end @@ -7744,6 +7907,15 @@ I always thought é was a cute letter.

!! end +!! test +text with entity-escaped character entity-like string: eacute +!! input +I always thought é was a cute letter. +!! result +

I always thought é was a cute letter. +

+!! end + !! test text with undefined character entity: xacute !! input @@ -10345,7 +10517,7 @@ Double RFC !! input RFC RFC 1234 !! result -

RFC RFC 1234 +

RFC RFC 1234

!! end @@ -10363,7 +10535,7 @@ RFC code coverage !! input RFC 983 987 !! result -

RFC 983 987 +

RFC 983 987

!! end @@ -12503,6 +12675,23 @@ File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascri !! end +!!test +Gallery with invalid title as link (bug 43964) +!! input + +File:foobar.jpg|link=< + +!! result + + +!! end + !!test Language parser function !! input @@ -13088,6 +13277,23 @@ disabled !! end +!! test +Tables: 4d. No escaping needed +!! input +{| +||+1 +||-2 +|} +!! result + + + +
+1 +-2 +
+ +!! end + #### --------------- Links --------------- #### 1. Quote marks in link text #### 2. Wikilinks: Escapes needed @@ -13344,6 +13550,46 @@ disabled

!! end +!! test +HTML tag with necessary entities in attributes +!! input +foo +!! result +

foo +

+!! end + +!! test +HTML tag with 'unnecessary' entity encoding in attributes +!! input +foo +!! result +

foo +

+!! end + +!! test +HTML tag with broken attribute value quoting +!! input + + +Foo + + +!! end TODO: more images