From: Platonides Date: Tue, 19 Apr 2011 18:39:37 +0000 (+0000) Subject: Change tests to match preprocessor changes in r86072. X-Git-Tag: 1.31.0-rc.0~30699 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=9f63d9678572417cb1d8257b16d3a6fbc1412dbb;p=lhc%2Fweb%2Fwiklou.git Change tests to match preprocessor changes in r86072. sed -i 's/<\(template\|tplarg\)>/<\1 lineStart=\\"1\\">/' phpunit/includes/parser/PreprocessorTest.php sed -i 's/<\(template\|tplarg\)>/<\1 lineStart="1">/' parser/preprocess/*.expected --- diff --git a/tests/parser/preprocess/All_system_messages.expected b/tests/parser/preprocess/All_system_messages.expected index 897c5fb00c..96d4569b62 100644 --- a/tests/parser/preprocess/All_system_messages.expected +++ b/tests/parser/preprocess/All_system_messages.expected @@ -1,4 +1,4 @@ - + <table border=1 width=100%><tr><td> '''Name''' diff --git a/tests/parser/preprocess/Factorial.expected b/tests/parser/preprocess/Factorial.expected index a10fd6cad3..099029c04b 100644 --- a/tests/parser/preprocess/Factorial.expected +++ b/tests/parser/preprocess/Factorial.expected @@ -1,4 +1,4 @@ -1011*011*021*031*041*051*061*071*081*091*101*111*121*131*141*151*161*171*181*191*201*211*221*231*241*251*261*271*281*291*301*311*321*331*341*351*361*371*381*391*401*411*421*431*441*451*461*471*481*491*501*511*521*531*541*551*561*571*581*591*601*611*621*631*641*651*661*671*681*691*701*711*721*731*741*751*761*771*781*791*801*811*821*831*841*851*861*871*881*891*901*911*921*931*941*951*961*971*981*99<noinclude> +1011*011*021*031*041*051*061*071*081*091*101*111*121*131*141*151*161*171*181*191*201*211*221*231*241*251*261*271*281*291*301*311*321*331*341*351*361*371*381*391*401*411*421*431*441*451*461*471*481*491*501*511*521*531*541*551*561*571*581*591*601*611*621*631*641*651*661*671*681*691*701*711*721*731*741*751*761*771*781*791*801*811*821*831*841*851*861*871*881*891*901*911*921*931*941*951*961*971*981*99<noinclude> This template finds the [[factorial]] of a number. To use it, enter:<br /> <code><nowiki></nowiki></code><br /> diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php index a3acd72906..f950f3b66e 100644 --- a/tests/phpunit/includes/parser/PreprocessorTest.php +++ b/tests/phpunit/includes/parser/PreprocessorTest.php @@ -47,42 +47,42 @@ class PreprocessorTest extends MediaWikiTestCase { array( "== Foo ==\n== Bar == \n", "== Foo ==\n== Bar == \n" ), array( "===========", "===========" ), array( "Foo\n=\n==\n=\n", "Foo\n=\n==\n=\n" ), - array( "{{Foo}}", "" ), + array( "{{Foo}}", "" ), array( "\n{{Foo}}", "\n" ), - array( "{{Foo|bar}}", "" ), - array( "{{Foo|bar}}a", "a" ), - array( "{{Foo|bar|baz}}", "" ), - array( "{{Foo|1=bar}}", "" ), - array( "{{Foo|=bar}}", "" ), - array( "{{Foo|bar=baz}}", "" ), - array( "{{Foo|1=bar|baz}}", "" ), - array( "{{Foo|bar|foo=baz}}", "" ), - array( "{{{1}}}", "1" ), - array( "{{{1|}}}", "1" ), - array( "{{{Foo}}}", "Foo" ), - array( "{{{Foo|}}}", "Foo" ), - array( "{{{Foo|bar|baz}}}", "Foobarbaz" ), + array( "{{Foo|bar}}", "" ), + array( "{{Foo|bar}}a", "a" ), + array( "{{Foo|bar|baz}}", "" ), + array( "{{Foo|1=bar}}", "" ), + array( "{{Foo|=bar}}", "" ), + array( "{{Foo|bar=baz}}", "" ), + array( "{{Foo|1=bar|baz}}", "" ), + array( "{{Foo|bar|foo=baz}}", "" ), + array( "{{{1}}}", "1" ), + array( "{{{1|}}}", "1" ), + array( "{{{Foo}}}", "Foo" ), + array( "{{{Foo|}}}", "Foo" ), + array( "{{{Foo|bar|baz}}}", "Foobarbaz" ), array( "{{Foo}}", "{<!-- -->{Foo}}" ), array( "{{{{Foobar}}}}", "{Foobar}" ), - array( "{{{ {{Foo}} }}}", " <template><title>Foo " ), - array( "{{ {{{Foo}}} }}", "" ), - array( "{{{{{Foo}}}}}", "" ), - array( "{{{{{Foo}} }}}", "<template><title>Foo " ), - array( "{{{{{{Foo}}}}}}", "<tplarg><title>Foo" ), + array( "{{{ {{Foo}} }}}", " <template><title>Foo " ), + array( "{{ {{{Foo}}} }}", "" ), + array( "{{{{{Foo}}}}}", "" ), + array( "{{{{{Foo}} }}}", "<template><title>Foo " ), + array( "{{{{{{Foo}}}}}}", "<tplarg><title>Foo" ), array( "{{{{{{Foo}}}}}", "{" ), array( "[[[Foo]]", "[[[Foo]]" ), - array( "{{Foo|[[[[bar]]|baz]]}}", "" ), // This test is important, since it means the difference between having the [[ rule stacked or not + array( "{{Foo|[[[[bar]]|baz]]}}", "" ), // This test is important, since it means the difference between having the [[ rule stacked or not array( "{{Foo|[[[[bar]|baz]]}}", "{{Foo|[[[[bar]|baz]]}}" ), array( "{{Foo|Foo [[[[bar]|baz]]}}", "{{Foo|Foo [[[[bar]|baz]]}}" ), array( "Foo BarBaz", "Foo display mapBar</display map >Baz" ), array( "Foo BarBaz", "Foo display map fooBar</display map >Baz" ), array( "Foo ", "Foo gallery bar="baz" " ), array( "Foo", "/fooFoo<//foo>" ), # Worth blacklisting IMHO - array( "{{#ifexpr: ({{{1|1}}} = 2) | Foo | Bar }}", ""), - array( "{{#if: {{{1|}}} | Foo | {{Bar}} }}", ""), - array( "{{#if: {{{1|}}} | Foo | [[Bar]] }}", ""), - array( "{{#if: {{{1|}}} | [[Foo]] | Bar }}", ""), - array( "{{#if: {{{1|}}} | 1 | {{#if: {{{1|}}} | 2 | 3 }} }}", ""), + array( "{{#ifexpr: ({{{1|1}}} = 2) | Foo | Bar }}", ""), + array( "{{#if: {{{1|}}} | Foo | {{Bar}} }}", ""), + array( "{{#if: {{{1|}}} | Foo | [[Bar]] }}", ""), + array( "{{#if: {{{1|}}} | [[Foo]] | Bar }}", ""), + array( "{{#if: {{{1|}}} | 1 | {{#if: {{{1|}}} | 2 | 3 }} }}", ""), array( "{{ {{Foo}}", "{{ "), array( "{{Foobar {{Foo}} {{Bar}} {{Baz}} ", "{{Foobar "), array( "[[Foo]] |", "[[Foo]] |"), @@ -94,7 +94,7 @@ class PreprocessorTest extends MediaWikiTestCase { array( "{{Foo|bar=[[baz]}}", "{{Foo|bar=[[baz]}}"), array( "{{foo|", "{{foo|"), array( "{{foo|}", "{{foo|}"), - array( "{{foo|} }}", ""), + array( "{{foo|} }}", ""), array( "{{foo|bar=|}", "{{foo|bar=|}"), /* array( file_get_contents( dirname( __FILE__ ) . '/QuoteQuran.txt' ), file_get_contents( dirname( __FILE__ ) . '/QuoteQuranExpanded.txt' ) ), */ );