X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fparser%2FparserTests.txt;h=7046a7f2fd7c432ef5a5dd1f2c478a61ef145f65;hp=ee33f1d7d18c1054f9b87946f52b6bc2f68d4fbd;hb=6cfb2e3d7a2b96d5041312fcec88248bb46573d7;hpb=b6a1f3bc774d043c69e9ed2875210049cdda9d68 diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index ee33f1d7d1..7046a7f2fd 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -10813,8 +10813,9 @@ parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } !! end !! test -Magic Word: {{REVISIONID}} +Magic Word: {{REVISIONID}} on latest revision !! options +lastsavedrevision parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } showflags !! wikitext @@ -10825,6 +10826,156 @@ showflags flags=vary-revision-id !! end +!! test +Magic Word: {{REVISIONID}} on non-latest revision +!! options +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONID}} +!! html/* +

1337 +

+flags=vary-revision-id +!! end + +!! test +Magic Word: {{REVISIONTIMESTAMP}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONTIMESTAMP}} +!! html/* +

19700101000203 +

+flags= +!! end + +!! test +Magic Word: {{REVISIONTIMESTAMP}} on non-existing page +!! options +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONTIMESTAMP}} +!! html/* +

123 +

+flags=vary-revision-timestamp +!! end + +!! test +Magic Word: {{REVISIONUSER}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONUSER}} +!! html/* +

127.0.0.1 +

+flags=vary-user +!! end + +!! test +Parser Function: {{REVISIONID:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONID:{{PAGENAME}}}} +!! html/* +

1337 +

+flags=vary-revision-id +!! end + +!! test +Parser Function: {{REVISIONID:{{PAGENAME}}}} on non-saved revision +!! options +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONID:{{PAGENAME}}}} +!! html/* + +flags=vary-revision-id +!! end + +!! test +Parser Function: {{REVISIONTIMESTAMP:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONTIMESTAMP:{{PAGENAME}}}} +!! html/* +

19700101000203 +

+flags=vary-revision-timestamp +!! end + +!! test +Parser Function: {{REVISIONDAY:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONDAY:{{PAGENAME}}}} +!! html/* +

1 +

+flags=vary-revision-timestamp +!! end + +!! test +Parser Function: {{REVISIONMONTH:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONMONTH:{{PAGENAME}}}} +!! html/* +

01 +

+flags=vary-revision-timestamp +!! end + +!! test +Parser Function: {{REVISIONYEAR:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{REVISIONYEAR:{{PAGENAME}}}} +!! html/* +

1970 +

+flags=vary-revision-timestamp +!! end + +!! test +Parser Function: {{PAGESIZE:{{PAGENAME}}}} on latest revision +!! options +lastsavedrevision +parsoid={ "modes": ["wt2html","wt2wt"], "normalizePhp": true } +showflags +!! wikitext +{{PAGESIZE:{{PAGENAME}}}} +!! html/* +

25 +

+flags=vary-revision-sha1 +!! end + !! test Magic Word: {{SCRIPTPATH}} !! options @@ -24146,6 +24297,49 @@ language=nl title=[[MediaWiki:Common.css]]

!! end +!! test +formatdate with invalid month +!! wikitext +{{#formatdate:2019-22-22|dmy}} +!! html +

2019-22-22 +

+!! end + +!! test +formatdate: dots in month name do not match any char (T220563) +!! options +language=de +!! wikitext +{{#formatdate:jun. 3|dmy}} +{{#formatdate:junx 3|dmy}} +!! html +

3 Juni +junx 3 +

+!! end + +!! test +formatdate uses correct capitalisation in French +!! options +language=fr +!! wikitext +{{#formatdate:Juin 3|dmy}} +!! html +

3 juin +

+!! end + +!! test +formatdate uses correct capitalisation in English +!! wikitext +{{#formatdate:june 3|dmy}} +!! html +

3 June +

+!! end + + # # #