This is a popular 'misuse' of the padleft/padright functions, which was not
tested in the main parser tests so far.
Change-Id: Icda02b34101c8c35b13c1e84d9f565867148d8d8
backup_PageTest expect the ContentLanguage to be English
(backupTextPassTest and backup_LogTest also get the change,
but don't require it)
Change-Id: I8b3482df011bccd9fe520ba07c8b8d70de3b9dbb
The ORDER BY should be at $options.
This was throwing errors in PHP 5.4 due to the array being
converted to a string down at Database.php:862
Fixes 50ee1d2
Change-Id: Ifb0fc70144242f25fc916fb8d380ed3e2d334fb9
which we weren't treating right.
* $limit in wfDebugBacktrace() is the number of returned frames,
we thus need to take into account the wfDebugBacktrace() frame, which
is sliced from debug_backtrace().
* wfGetCaller() needs to add a level for itself.
* MWDebug::warning() was logging itself as the warning issuer,
which is useless (the call a few lines before was right, though)
MWDebugTest.php changed accordingly.
* Removed double call to wfGetCaller( $callerOffset + 1 )
* Documented the meaning of wfGetCaller() parameter
* Added unit test
Change-Id: Ief50f4c810bad8b03bb2bf9dc6d945d9acb29851
This is not a real fix for the cause of the bug (which is a
pcre.recursion_limit that is far too low), but I do wonder
about the efficiency of using a regexp to test for valid
UTF-8 encoding. After all the regexp has to be compiled first
into a state machine.
Patch set 2: Php unit test for Language.checkTitleEncoding
Patch set 3: benchmark
Patch set 4: add benchmark for non-capturing subgroup in regexp, and
since that's faster than a capturing subgroup, use it in
checkTitleEncoding() in the regexp branch.
Patch set 5: use Tim's suggestion (once-only pattern) in the regexp
branch. Also add to benchmark.
Change-Id: I551f096921d4c9c57cbcb091b80ab5970ca86a9b
Patchset 2: attempt to fix sql error when using sqlite
Patchset 3: for great justice
Patchset 4: sqlite, not postgres... /facepalm
Patchset 5: joy, more sql divergence...
Patchset 7: handle inconsistencies in MWs database abstraction layer
Change-Id: I1948c4ad815008321801c93584eb249c1f597560
* Also tweaked timestamp tolerance in tests, intended for Swift
* Also made a few tweaks to speed up tests a bit
Change-Id: Ibdee36d3bf86089b027dc74bb2582acc1ab4b96b
When generalizing LinksUpdate to DataUpdate and introducing
WikiPage::getDeletionUpdates(), WikiPage::doDeleteUpdates()
was removed, even though it was still used by Title::moveToInternal().
This patch restores WikiPage::doDeleteUpdates(), using the
new logic based on WikiPage::getDeletionUpdates() to implement it.
Change-Id: I12a49d5ca3ccb6bb9cbb63dde436bcf2a7d8a985
* doQuickOperations() lets us do things like purge thumbnails as fast as possible.
Stat calls, SHA1 checks, and RTTs in general are avoided. It also avoids the
slowness of lazy population of thumbnail SHA1s in Swift (for those made by rewrite.py).
* Removed supportedOperations() to avoid the extra complexity.
* Made a few variable type and exception documentation cleanups.
* Cleaned up unit test file removal a bit and made some functions private.
Change-Id: I6922368c6af7752a6927d96402519132203108a1
This test case is intended to test the updating of various links
tables using a LinksUpdate object, based on the information in
a ParserOutput object.
Patch set 3: Suggestions by Aaron:
factored assertSelect() out into MediaWikiTestCase.
Force sorting of result set under testing.
Change-Id: I2d01e67ee7396080a04e5dff637aca0dc159c65d
- Instead of having newMwEnvironment only create an object with
setup() and teardown() that is passed to module() which uses them.
Also allow a module test to pass additional setup/teardown to run.
Otherwise one would have to extend newMwEnvironment, this is
simpler.
- Also added a few unit tests of the test runner's newMwEnvironment
method itself. (also serves as document/example for how to use it)
- This changes the signature of QUnit.newMwEnvironment. Was only
used in 2 places in core. Adding release notes just in case.
- Needed to fix a unit test breakage in mw.Uri
Change-Id: I2c17f4a309208276ab7bd2420b720c0d8e4bf328
This whitespaces causes an extra empty paragraph between text and transcluding a special page.
When a heading precedes a transcluded special page, there is no difference and it's fine with or without this whitespace.
See for example http://incubator.wikimedia.org/w/index.php?title=Incubator:Sandbox&oldid=822299
Change-Id: I6b06006d921368619d3969660c244176344e8aff
rename MWNamespace::isNonincludableNamespace
to MWNamespace::isNonincludable, because "Namespace" is already in the
class name
Change-Id: Ie982835c7dc84cb10c823996e5360cc1b342f704
* FS backends work via popen() and basic shell commands.
* Swift backends use the custom SwiftCloudFiles async features.
* Refactored storagePathsRead()/storagePathsChanged() to normalize the paths
for correct dependency detection in FileOpBatch.
* Cleaned up SwiftFileBackend exception handling to make debugging easier.
* Added a quick and dirty performance testing script.
* Updated unit tests to include a run with parallelize=implicit.
* Improved file test failure output a bit.
Change-Id: I6a5ed743c30c598e0dd7301dbdb3631c460332fd
Main changes:
* handlePending() correctly handles "missing" and "error" states
and propagates error states up the dependency tree.
* handlePending() is called whenever a module enters one of the
states "ready", "error", or "missing" (in execute() and
mw.loader.state()).
* load() filters out not only undefined modules, but -- by the logic of
the comment there -- also modules in state "error" or "missing".
Minor changes:
* recurse() renamed to sortDependencies(), also uses a hash for
unresolved now instead of an array.
* execute() was never called with the second parameter "callback", hence
I've removed it.
* simplified the "are all dependencies 'ready'?" test and moved it to
its own function.
The change comes with additional QUnit tests for mw.loader. If I run
these tests against the current mediawiki.js, several of them fail. In
particular test #86 ("mw.loader real missing dependency") is
instructive: if the server returns "missing" for a module, dependent
modules never progress beyond "loaded", and if there are jobs (from
mw.loader.using()) depending on such a missing module (directly or
indirectly), neither ready() nor error() is ever called.
Running the tests against the changed mediawiki.js in this change, they
all succeed for me.
Patchset 2: whitespace changes, $_GET instead of $_REQUEST in
testloader.
Patchset 3: XML::encodeJsVar() in testloader, deepEqual() in Qunit
tests.
Patchset 4: rebase
Patchset 5: Amend commit message only (typo)
Change-Id: Ia67edfc07fc9237def04ed13bb2cee16e519d7af
* Fixed unlocking logic in FSLockManager for case when an EX lock was made, then an SH one, and then the EX one was "unlocked"
* Avoid hiding useful unlink() warnings in FSLockManager
* Reduced locking use in test cleanup code
* Added a simple testLockCalls() test function
* Made a few cleanups & fixes to backend tests
Change-Id: I1110d9b537c450d9feca5a2fb35519c22435e81d
New tests are added to avoid regressions when the ContentHandler facility
is introduced.
Changeset 3: use tablesUsed to allow database cleanup after test, as per
Aaron's suggestion.
Changeset 4: use array_merge instead of +=.
Changeset 5: trying dumber rollback test to see of jenkins likes it better.
Change-Id: I0a9f8dfd30031baa4b12cc128a39059868149884
If the test says it uses database tables, then it needs the database.
And while we are at it, make the check for the test group declaration
more lenient.
Patch set 2: tweaked according to demon's comments.
Change-Id: Ib123745d45b85cebeab5ec87ea7d8227ec3d1dea
This is a follow-up to I6934d03e (no 6414).
Declare tables in $this->tablesUsed to allow for database clenaup,
as Aaron suggested.
Change-Id: Iac05b0428b335879729f6d3b993eac0d3151429c