X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=e2bf9f64fbb649604a92dd619dab0d2f64fee210;hb=85d4e39ff096d05386fd2f333cd6acea66ad6f90;hp=9cea15637fe56b871a6ad609bfcbb4e67c9e08ee;hpb=90892321696451fb444ce2d70b434e91b8a4fc69;p=lhc%2Fweb%2Fwiklou.git
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 9cea15637f..e2bf9f64fb 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -21,12 +21,15 @@
# 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-only test (not run by PHP parser)
-# php php-only test (not run by the parsoid parser)
+# 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
# 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
#
# You can also set the following parser properties via test options:
# wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel,
@@ -519,27 +522,55 @@ Italics and bold: 2-quote opening sequence: (2,2)
!! test
Italics and bold: 2-quote opening sequence: (2,3)
+!! options
+parsoid=wt2html
!! wikitext
''foo'''
-!! html
+!! html/*
foo'
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 2-quote opening sequence: (2,3) w/ nowiki
+!! wikitext
+''foo'''
+!! html
+
foo'
+
+!! end
+
+
!! test
Italics and bold: 2-quote opening sequence: (2,4)
+!! options
+parsoid=wt2html
!! wikitext
''foo''''
-!! html
+!! html/*
foo''
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 2-quote opening sequence: (2,4) w/ nowiki
+!! wikitext
+''foo''''
+!! html
+
foo''
+
+!! end
+
+
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: 2-quote opening sequence: (2,5)
+!! options
+parsoid=wt2html
!! wikitext
''foo'''''
!! html/php
@@ -550,6 +581,19 @@ Italics and bold: 2-quote opening sequence: (2,5)
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 2-quote opening sequence: (2,5+3) w/ nowiki
+!! wikitext
+''foo''''''''
+!! html/php
+
foo
+
+!! html/parsoid
+
foo
+
+!! end
+
###
### 3-quote opening sequence tests
@@ -577,17 +621,32 @@ Italics and bold: 3-quote opening sequence: (3,3)
!! test
Italics and bold: 3-quote opening sequence: (3,4)
+!! options
+parsoid=wt2html
!! wikitext
'''foo''''
-!! html
+!! html/*
foo'
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 3-quote opening sequence: (3,4) w/ nowiki
+!! wikitext
+'''foo''''
+!! html
+
foo'
+
+!! end
+
+
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: 3-quote opening sequence: (3,5)
+!! options
+parsoid=wt2html
!! wikitext
'''foo'''''
!! html/php
@@ -598,6 +657,19 @@ Italics and bold: 3-quote opening sequence: (3,5)
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 3-quote opening sequence: (3,5+2) w/ nowiki
+!! wikitext
+'''foo'''''''
+!! html/php
+
foo
+
+!! html/parsoid
+
foo
+
+!! end
+
###
### 4-quote opening sequence tests
@@ -605,14 +677,27 @@ Italics and bold: 3-quote opening sequence: (3,5)
!! test
Italics and bold: 4-quote opening sequence: (4,2)
+!! options
+parsoid=wt2html
!! wikitext
''''foo''
-!! html
+!! html/*
''foo
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,2) w/ nowiki
+!! wikitext
+''''foo''
+!! html
+
''foo
+
+!! end
+
+
!! test
Italics and bold: 4-quote opening sequence: (4,3)
!! wikitext
@@ -625,17 +710,32 @@ Italics and bold: 4-quote opening sequence: (4,3)
!! test
Italics and bold: 4-quote opening sequence: (4,4)
+!! options
+parsoid=wt2html
!! wikitext
''''foo''''
-!! html
+!! html/*
'foo'
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,4) w/ nowiki
+!! wikitext
+''''foo''''
+!! html
+
'foo'
+
+!! end
+
+
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: 4-quote opening sequence: (4,5)
+!! options
+parsoid=wt2html
!! wikitext
''''foo'''''
!! html/php
@@ -646,6 +746,19 @@ Italics and bold: 4-quote opening sequence: (4,5)
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 4-quote opening sequence: (4,5+2) w/ nowiki
+!! wikitext
+''''foo'''''''
+!! html/php
+
'foo
+
+!! html/parsoid
+
'foo
+
+!! end
+
###
### 5-quote opening sequence tests
@@ -654,34 +767,74 @@ Italics and bold: 4-quote opening sequence: (4,5)
!! test
Italics and bold: 5-quote opening sequence: (5,2)
!! options
+parsoid=wt2html
!! wikitext
'''''foo''
-!! html
+!! html/*
foo
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+# skipping wt2html and html2html because it wants to put before
+!! test
+Italics and bold: 5-quote opening sequence: (5,2+3)
+!! options
+parsoid=wt2wt,html2wt
+!! wikitext
+'''''foo'''''
+!! html/*
+
foo
+
+!! end
+
!! test
Italics and bold: 5-quote opening sequence: (5,3)
+!! options
+parsoid=wt2html
!! wikitext
'''''foo'''
-!! html
+!! html/*
foo
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 5-quote opening sequence: (5,3+2)
+!! wikitext
+'''''foo'''''
+!! html
+
foo
+
+!! end
+
+
!! test
Italics and bold: 5-quote opening sequence: (5,4)
+!! options
+parsoid=wt2html
!! wikitext
'''''foo''''
-!! html
+!! html/*
foo'
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: 5-quote opening sequence: (5,4+2) w/ nowiki
+!! wikitext
+'''''foo''''''
+!! html
+
foo'
+
+!! end
+
+
!! test
Italics and bold: 5-quote opening sequence: (5,5)
!! wikitext
@@ -696,37 +849,78 @@ Italics and bold: 5-quote opening sequence: (5,5)
###
!! test
Italics and bold: multiple quote sequences: (2,4,2)
+!! options
+parsoid=wt2html
!! wikitext
''foo''''bar''
-!! html
+!! html/*
foo'bar
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,2+3) w/ nowiki
+!! wikitext
+''foo''''bar'''''
+!! html
+
foo'bar
+
+!! end
+
+
!! test
Italics and bold: multiple quote sequences: (2,4,3)
+!! options
+parsoid=wt2html
!! wikitext
''foo''''bar'''
-!! html
+!! html/*
foo'bar
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,3+2) w/ nowiki
+!! wikitext
+''foo''''bar'''''
+!! html
+
foo'bar
+
+!! end
+
+
!! test
Italics and bold: multiple quote sequences: (2,4,4)
+!! options
+parsoid=wt2html
!! wikitext
''foo''''bar''''
-!! html
+!! html/*
foo'bar'
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (2,4,4+2) w/ nowiki
+!! wikitext
+''foo''''bar''''''
+!! html
+
foo'bar'
+
+!! end
+
+
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: multiple quote sequences: (3,4,2)
+!! options
+parsoid=wt2html
!! wikitext
'''foo''''bar''
!! html/php
@@ -737,10 +931,27 @@ Italics and bold: multiple quote sequences: (3,4,2)
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (3,4,2+2) w/ nowiki
+!! options
+parsoid
+!! wikitext
+'''foo''''bar''''
+!! html/php
+
foo'bar
+
+!! html/parsoid
+
foo'bar
+
+!! end
+
# The PHP parser strips the empty tags out for giggles; parsoid doesn't.
!! test
Italics and bold: multiple quote sequences: (3,4,3)
+!! options
+parsoid=wt2html
!! wikitext
'''foo''''bar'''
!! html/php
@@ -751,6 +962,19 @@ Italics and bold: multiple quote sequences: (3,4,3)
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+!! test
+Italics and bold: multiple quote sequences: (3,4,3+3) w/ nowiki
+!! wikitext
+'''foo''''bar''''''
+!! html/php
+
foo'bar
+
+!! html/parsoid
+
foo'bar
+
+!! end
+
###
### other quote tests
###
@@ -776,14 +1000,30 @@ Italics and bold: other quote tests: (2,(3,3),2)
!! test
Italics and bold: other quote tests: (3,2,3,2)
+!! options
+parsoid=wt2html
!! wikitext
'''this is about ''foo'''s family''
-!! html
+!! html/*
this is about foos family
!!end
+# same html as previous, but wikitext adjusted to match parsoid html2wt
+# add 'parsoid' option to use 'parsoid' normalization of the placeholder
+!! test
+Italics and bold: other quote tests: (3,2,3+2+2,2)
+!! options
+parsoid
+!! wikitext
+'''this is about ''foo'''''''s family''
+!! html/*
+
this is about foos family
+
+!! end
+
+
!! test
Italics and bold: other quote tests: (3,2,3,3)
!! options
@@ -1195,6 +1435,22 @@ b
!! end
+!! test
+Multiple comments should still parse as SOL-transparent
+!! options
+parsoid=wt2html,wt2wt
+!! wikitext
+*a
+*b
+!! html
+
+
a
+
+
b
+
+
+!! end
+
###
### paragraph wrapping tests
###
@@ -1896,6 +2152,29 @@ bar
!! end
+!! test
+Templates: Handle comments in the target
+!! wikitext
+{{echo
+
+|foo}}
+
+{{echo
+|foo}}
+
+{{echo|foo}}
+
+{{echo|foo}}
+!!html/parsoid
+
foo
+
+
foo
+
+
foo
+
+
foo
+!!end
+
#--------------------------------------------------------------------
# Transclusion parameter escaping tests
#--------------------------------------------------------------------
@@ -5509,6 +5788,17 @@ language=kaa
!! end
+!! test
+Link with multiple ":" in a subpage-supporting namespace (bug 63636)
+!! wikitext
+[[User:Foo/Test/63636:Bar|Test]]
+!! html/php
+
+!! end
+
!! test
1. Interaction of linktrail and template encapsulation
!! options
@@ -5679,16 +5969,30 @@ Interwiki link with fragment (bug 2130)
# Ideally the wikipedia: prefix here should be proto-relative too
!! test
Different interwiki prefixes mapping to the same URL
-!! options
-parsoid
!! wikitext
+[[:en:Foo]]
+
+[[:en:Foo|Foo]]
+
[[wikipedia:Foo]]
-[[:en:Foo]]
-!! html
-