From 8081138adbf37e12e4af9114a631612ed44d11db Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 17 Jan 2011 19:54:44 +0000 Subject: [PATCH] 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. --- tests/phpunit/includes/parser/PreprocessorTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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' ) ), */ ); } -- 2.20.1