From: Platonides Date: Mon, 17 Jan 2011 19:54:44 +0000 (+0000) Subject: Follow up r80376. Added missing file FORMAT. X-Git-Tag: 1.31.0-rc.0~32496 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=8081138adbf37e12e4af9114a631612ed44d11db;p=lhc%2Fweb%2Fwiklou.git Follow up r80376. Added missing file FORMAT. Fixed method call in Preprocessor_Native.php. Added support for tags containing spaces (r80025), following the same odd order dependant behavior as the php preprocessors. Extensions shouldn't rely on it. See http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/51496 As a result of these changes, there is much less worst-case lookahead now. in_array.{c,h} are now unused. --- diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php index b001453d0d..b072853672 100644 --- a/tests/phpunit/includes/parser/PreprocessorTest.php +++ b/tests/phpunit/includes/parser/PreprocessorTest.php @@ -14,7 +14,7 @@ class PreprocessorTest extends MediaWikiTestCase { } function getStripList() { - return array( 'gallery' ); + return array( 'gallery', 'display map' /* Used by Maps, see r80025 CR */, '/foo' ); } function provideCases() { @@ -66,8 +66,13 @@ class PreprocessorTest extends MediaWikiTestCase { 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( file_get_contents( dirname( __FILE__ ) . '/QuoteQuran.txt' ), file_get_contents( dirname( __FILE__ ) . '/QuoteQuranExpanded.txt' ) ), */ ); }