Commit graph

27 commits

Author SHA1 Message Date
Max Semenik
817ffbb6bf Fix E_STRICT 2011-03-05 16:32:32 +00:00
Chad Horohoe
b661588c1f Followup r83140: FakeMemCachedClient -> EmptyBagOStuff in tests 2011-03-03 12:55:22 +00:00
Bryan Tong Minh
ecf3419a3a Remove double parser test from r82843 2011-02-26 12:19:55 +00:00
Bryan Tong Minh
bf067d3395 (bug 27679) Broken embedded files with special characters are no longer double HTML escaped
Was a double escape in Linker::makeBrokenImageLinkObj. I checked the callers and other usages in the function and $prefix and $inside appear to be assumed HTML fragments
Added parser tests: Passed 622 of 624 tests (99.68%)... 2 tests failed! Those two tests already failed for me before this patch
2011-02-26 12:08:59 +00:00
OverlordQ
102e3d21a7 Fix core parserTests for recent <gallery> changes 2011-02-24 17:16:31 +00:00
Platonides
e70beaa325 Follow up to r81829. Poison var_dump, so that debug statements like r81671 can be easily detected.
The three 'right' usages are
* includes/Import.php
* includes/api/ApiFormatDump.php
* tests/parser/parserTestsParserHook.php
2011-02-09 17:36:25 +00:00
Platonides
db7d7ebd28 Don't use ob_start/ob_get_contents/ob_end_clean just to var_dump() a string. Cleaning var_dump() usage. 2011-02-09 17:21:39 +00:00
Daniel Friesen
1455b81f0c Kill off Linker::getExternalLinkAttributes. 2011-02-05 23:06:36 +00:00
Alexandre Emsenhuber
51c6afc751 * Replaced $wgMessageCache by MessageCache::singleton(); since we only use one instance of this class (as for ParserCache, LinkCache)
* MessageCache::singleton() calls wfGetMessageCacheStorage() directly instead of using $messageMemc, just in case this would be called before that variable is set
* Per TimStarling: also removed deprecated methods in MessageCache class: addMessages() and related, [get|set|enable|disable]Transform(), loadAllMessages(), loadMessageFile() and some others. Same for the legacyData stuff in LocalisationCache that was only used by MessageCache::addMessages() and related. 
* Converted remaining extensions
2011-01-26 15:42:04 +00:00
Brion Vibber
0f3c246fe5 Provisionally reverting r80430 (bug 529, 12974)
As noted in CR there are some issues where we're trading one set of weird behavior for a different, but previously unknown, set of weird behavior which breaks existing markup that works around the old behavior.
I'd recommend keeping this in store for after the 1.17 stuff calms down so unexpected parser changes aren't cropping up in the middle of things for people working with trunk.

If these are the right changes to make then great -- but they should be done after the consequences are better understood and folks can prepare for changes.
2011-01-26 01:16:18 +00:00
Alexandre Emsenhuber
750b9b4931 Explicitely enable language and title conversion otherwise this breaks tests when disabled in local config 2011-01-24 20:08:09 +00:00
Platonides
8a6475bd70 Don't look for pipes in the root node. 2011-01-22 16:34:14 +00:00
Platonides
069765d4b6 Add full articles to preprocessor tests.
* QuoteQuran.txt is GFDL/CC-BY-SA, created by [[en:User:Striver]] at http://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988
* Factorial.txt is GFDL + CC-BY-SA, created by [[en:User:Polonium]] at http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 
* All_system_messages.txt was generated by MediaWiki, so already GPL. Copied from http://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765

Added along their preprocessed xml.
2011-01-21 23:03:33 +00:00
Ilmari Karonen
7e5472dea3 followup r80511: make {{PAGENAMEE}} and friends also call wfEscapeWikiText() (why is the code duplicated, anyway??) 2011-01-18 20:15:50 +00:00
Ilmari Karonen
2fcb5285c3 bug 26781: make wfEscapeWikiText() escape "*", "#", ";" and ":" at the beginning of the output and after line feeds. Also make escaping of "{", "}" and "=" more thorough and rewrite to use strtr() instead of str_replace() and htmlspecialchars(). 2011-01-18 19:39:13 +00:00
Happy-melon
2d8ee839cb (bug 529, bug 12974) alter behaviour of the table- and template-parser:
* Remove the hack from bug 529 which inserts a newline when the template text begins with any block character; this breaks many things in many exciting ways.  I've left it in for now when the text begins with a wikitable, as that markup can't be mistaken for anything else.
* Instead, move the contents of a table cell onto a new line for parsing, so that linestart elements (including nested tables) will parse as normal.  

This means that structures like

{| 
| {{template-containing-wikilist}}
|}

Will still work, but for the right reason, and structures like

{|
| style="color:{{template-containing-hexcode}}" | Foo
| * Bar
| {|
   | Look at me, I'm nested!
  |}
|}

Will all now start to work.  Structures like 

* Foo {{template-containing-wikilist}}

Will now not, but honestly, should they?
2011-01-16 23:57:13 +00:00
Happy-melon
12d0cb6aa3 Fix diff output for failed tests on windows, which typically doesn't have a 'diff' command; use 'fc' instead. 2011-01-16 23:43:15 +00:00
Niklas Laxström
a088ec0594 Horrible tabsoup converted to spaces 2011-01-09 11:12:06 +00:00
Sam Reed
4ee5d368db Followup r72119, add some braces
Document $db in parserTest
2011-01-07 00:55:09 +00:00
Platonides
43fd2040ee Failing test for bug 11748 2011-01-05 22:44:56 +00:00
Platonides
a580328bed Set $wgAdaptiveMessageCache for parserTests until NikeRabbit fixes r78179 2010-12-28 15:54:51 +00:00
Chad Horohoe
3a9a451e8c Followup r79093: Move DROP TABLE code to Database classes and properly rename back to original table prefix in destroyDatabase() 2010-12-28 01:19:16 +00:00
Chad Horohoe
4a5e562591 Refactor table cloning code into its own class so it can maybe be used by things other than the parser tests 2010-12-28 00:44:16 +00:00
Brion Vibber
c9f6f2acea * bug 26437: fix for Sanitizer::decodeCharReferences converting invalid hex character references
Patch by Umherirrender: https://bugzilla.wikimedia.org/attachment.cgi?id=7931&action=edit

Also added a parser regression test case: "HTML Hex character encoding bogus encoding (bug 26437 regression check)"
2010-12-27 03:21:43 +00:00
Brian Wolff
8c5cdb2a68 follow up to r78952 add parser tests relating to internal links with % encoding and + signs in them. 2010-12-24 10:24:16 +00:00
Mark A. Hershberger
a36ae22c6b * re r76385 Add parser tests for $wgExternalLinkTarget on images 2010-12-18 21:45:44 +00:00
Chad Horohoe
23f69f10ed Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this. 2010-12-14 16:26:35 +00:00