Commit graph

2812 commits

Author SHA1 Message Date
Ori Livneh 7831957091 Add unit tests, demonstrating how to stub out deps.
Physikerwelt asked for some guidance on how to write good unit tests for
classes that depend on external resources. I wrote a few to serve as examples
for additional tests. Because they have an ulterior didactic purpose, the
comments are a bit more verbose than I would otherwise like, but despite that
the tests are good enough to merit being merged.

Change-Id: Ifa97eec1a68fb68b4744d1e5b192b410afe5ef68
2013-02-17 20:55:47 -08:00
Moritz Schubortz c869831f45 Add and register PHP unit tests for MathSource class
This change adds test cases for the MathSource class and registers a
hook for loading these tests. Also adds documentation about how to run
these tests in README.

Change-Id: Ie58a273326e0353dfa4437b3de21a2393adb5a87
2013-02-17 20:23:50 +00:00
Daniel Friesen 48b029fbe9 Fix MathRenderer::renderMath.
The call to getRenderer is supposed to be a static method in the same class,
not a global function.

Change-Id: I5d101574b1d67238c6357e154209f2595cb36859
2013-02-17 10:32:09 +01:00
Matthew Flaschen 8a04254e6d Change default LockManager back to nullLockManager.
* This was changed in 926db7c3bd as a workaround for a testing issue.
* See 8cbd679aac781bdd73038064261736a937645fc1 , which fixes the test harness in core .

Change-Id: Ib57cafee35a699ce875ee4bc8951781e1a37553a
2013-02-08 13:59:26 -05:00
Physikerwelt 926db7c3bd Restructuring Math classes
The Math.body file which contains the MathRender class was split in the following way:
- Math.base contains the base class with the database related stuff and provides an abstract interface
- Math.source and Math.MathJax handle the plain tex string output. There are two classes since they
  will differntiate in the future I think.
- Math.texvc contains the "old" implementation of png generation with all the file handling related stuff
- Other implementation of math renderer can be added in the same style.
- Cleanup to better follow coding conventions.
- Changed LockManager to 'fsLockManager'

The first attempt restructure the class layout and introduce LaTeXML at the same
time was dropped. Instead this was split up into two phases.
This commit only deals about the restructuring of the math module design.

Change-Id: I9b1d68c4faa8d177d8d0088fa1a5879caed4f1fe
2013-02-07 20:35:45 -08:00
Timo Tijhof c14159404f JSHint: Equality, unused arguments and other minor remnants.
After this jshint passes.

Change-Id: Iee640a1d485ac23caaa783b0069ce9f1616db9ad
2013-02-06 20:20:14 -08:00
Timo Tijhof 282960c4ba JSHint: Fix var statement and global scope issues.
Change-Id: Ia567d10b72f86963eb344cd5579738532531d3d9
2013-02-06 20:14:02 -08:00
Timo Tijhof 8a29221a83 JSHint: Fix curly braces.
Change-Id: Ib59ab38b2c3d9270d882798242e796b823206a50
2013-02-06 20:08:22 -08:00
Antoine Musso ca6a896cb0 JSHint: Fix quotmark and semicolon warnings.
Change-Id: I2ab9e7ce308fd47336f86d2571e8450347321f10
2013-02-06 20:02:47 -08:00
jenkins-bot 33c30a0d6c Merge "JSHint: Add .jshintrc" 2013-02-07 03:54:57 +00:00
Antoine Musso b13ec348ac JSHint: Add .jshintrc
Based on settings from MediaWiki core.

Change-Id: I71345f6906d430fcca750c995a689f785831e3f8
2013-02-06 19:54:07 -08:00
Translation updater bot a10ba58bc8 Localisation updates from http://translatewiki.net.
Change-Id: I47597423a9fd654cf999e7b9e7db29eb2ce7d21a
2013-01-29 21:02:36 +00:00
Translation updater bot 394275be20 Localisation updates from http://translatewiki.net.
Change-Id: I43d0cf6b012936f76379b87cd2834255e6394d19
2013-01-27 18:53:37 +00:00
Translation updater bot f9de81a9da Localisation updates from http://translatewiki.net.
Change-Id: Idb8014be033c9cf376ae8cec3c2fc0ad1878867f
2013-01-27 17:48:22 +00:00
Translation updater bot 3044599afe Localisation updates from http://translatewiki.net.
Change-Id: Ie9a3d11ff06a6852fb0f560de0a04c401a576c26
2013-01-22 20:50:00 +00:00
Antoine Musso b029a4037e JSHint: ignore modules/MathJax
modules/MathJax is a third party library, we do not want to report
JSHint errors for it. Any errors there should be committed upstream.

Change-Id: I48a73eacb635149141e554853bf4aef65ecdcd49
2013-01-18 12:22:28 +01:00
Translation updater bot 766d548df9 Localisation updates from http://translatewiki.net.
Change-Id: Ic1a1c5e39aafb630c5d2d2478e39e869a3a7fc9b
2013-01-06 20:12:18 +00:00
Ori.livneh 33ee76cdae Merge "Rename Math.body to MathRenderer to be consistent with the class name. Reson: Further classes will be added in the next step." 2013-01-02 04:25:39 +00:00
Translation updater bot 3318be4b31 Localisation updates from http://translatewiki.net.
Change-Id: I97a3f906e57f5a06ff20040d197148c3d25daee7
2013-01-01 20:24:00 +00:00
physikerwelt 7ff47f898f Rename Math.body to MathRenderer to be consistent with the class name.
Reson: Further classes will be added in the next step.

Change-Id: I9dba8c1fca11cbc51fa11edebabde4687d17e312
2013-01-01 17:16:35 +01:00
Translation updater bot 075abb7b1e Localisation updates from http://translatewiki.net.
Change-Id: I67f28a8026b7b9844ad1b3b39dafaa0f97f54419
2012-12-27 21:23:09 +00:00
Translation updater bot 02f89f6ac0 Localisation updates from http://translatewiki.net.
Change-Id: I76b50906fafff8511ba070b8c14e502aacbe8be6
2012-12-09 20:27:54 +00:00
Translation updater bot 62a0074461 Localisation updates from http://translatewiki.net.
Change-Id: I750d911086f7b626f51b48dc66d3bcd3d4e8a41e
2012-11-16 20:38:02 +00:00
Translation updater bot 162e9bdfef Localisation updates from http://translatewiki.net.
Change-Id: I673e5fd0462ff3268f62f3ccf7a80a324541e751
2012-11-13 21:09:27 +00:00
Translation updater bot 5dee7e52c3 Localisation updates from http://translatewiki.net.
Change-Id: Icdef993aebf324a0b6354dfe66648459f3011a90
2012-11-11 20:56:22 +00:00
Derk-Jan Hartman 7e58acc95a (bug 36855) escape literal % in tex input
This removes support for MathML % comments, just as with texvc

PS2: Fix for regex lookbehind issue

Change-Id: I0cb026d749733ed3dbba8faacb163be4438fc6bb
2012-11-01 16:22:59 +01:00
Translation updater bot a998a493b0 Localisation updates from http://translatewiki.net.
Change-Id: Ied923fb20ec7550e956d7e804e17222fb2e9b5da
2012-10-28 21:11:42 +00:00
Translation updater bot 47e3cdbfe4 Localisation updates from http://translatewiki.net.
Change-Id: I02d00d05131aa8e23513241cb0fe6a060f2d3fd6
2012-10-22 01:21:46 +00:00
Aaron Schulz b3b28e5892 Fixed file mode setting.
Change-Id: I3d933fbfe2078e6ae9f990df47206bc38ce8f675
2012-10-17 09:27:55 -07:00
Translation updater bot 5bbee223c4 Localisation updates from http://translatewiki.net.
Change-Id: I693cdfd1b538539be1e15d7af89e2cdf269c959f
2012-10-06 21:29:28 +00:00
Siebrand Mazeland 22a09c87d3 Replace remaining wfMsg* call.
Also remove some trailing whitespace.

Change-Id: Ic7a706a894dd07ca638173f2fc6e1695a05f914b
2012-10-04 19:42:13 +02:00
Translation updater bot d4eea42233 Localisation updates from http://translatewiki.net.
Change-Id: I7ec4855c055ffc6b4d13ce16ad237e59ff74e2bb
2012-10-02 13:48:17 +00:00
Translation updater bot 2a9f5a7ece Localisation updates from http://translatewiki.net.
Change-Id: Id5b5b394f913ee38542241e75eff7ea2276c07c4
2012-10-01 20:02:22 +00:00
Translation updater bot 71c9dea4c4 Localisation updates from http://translatewiki.net.
Change-Id: I441401fd1e76b4f5820b44ac179944920cbb95f7
2012-09-26 19:48:05 +00:00
Derk-Jan Hartman dc20c51d91 (bug 38720) Output the Math errors in a consistent language
Outputting as content language now.

Change-Id: I77cc38b2db129e904aaf8ada012da4f4160867fd
2012-09-07 19:43:09 +02:00
Derk-Jan Hartman 25cce43f9f (bug 35556) Allow MathJax to report errors.
Change-Id: Ibed05d3a4a28f7f99bc379f765d633256a8ddc12
2012-09-07 15:40:44 +02:00
Siebrand Mazeland 7b2b7301e0 Maintenance for Math extension.
* Replace deprecated wfMsg* calls with alternatives.
* Add FIXME for occurrence I don't know how to replace.
* Update some docs.
* Sprinkle a few semi-colons over the JavaScript.

Change-Id: I755a95f8bba48a23ef8c432e232adfaef4caae70
2012-08-31 01:25:48 +02:00
Aaron ae9e0d989b Added file backend support via $wgMathFileBackend.
* Also removed old legacy migration code.

Change-Id: I43cfd7f0da49690a2d0b4eb2daab9b8a110137b7
2012-08-22 17:16:49 -07:00
Translation updater bot 29a0a80e8f Localisation updates from http://translatewiki.net.
Change-Id: I4bf24d364416894874077e1570aa2b9f6f9fa02a
2012-08-20 19:20:18 +00:00
Translation updater bot 0f35575e82 Localisation updates from http://translatewiki.net.
Change-Id: If8484d7b9b72e36a85aeca3d3c939b4c6ad5d2b3
2012-08-19 14:47:42 +00:00
Translation updater bot 6dfbd3a80b Localisation updates from http://translatewiki.net.
Change-Id: Ia7cefda210d836b064b68ecd1588919b0458d80a
2012-08-11 00:07:01 +00:00
Translation updater bot 401c957a47 Localisation updates from http://translatewiki.net.
Change-Id: I808a74f9ee23ae94b73b4c39753f9e633e836e28
2012-08-09 19:29:09 +00:00
Translation updater bot d3ac76c332 Localisation updates from http://translatewiki.net.
Change-Id: Icae9812ae1aa76abd253bcb12f1d37e183daf370
2012-08-03 16:19:17 +00:00
awjrichards 2c7ad693fe Merge "Fix Change I6d548d06, redo Change I23407ae6: Add one more space" 2012-07-20 21:43:25 +00:00
Translation updater bot c2d25d464d Localisation updates from http://translatewiki.net.
Change-Id: Iff4d5ada6321b815eb8d5d6a3c322e79ec608534
2012-07-11 07:15:15 +00:00
Translation updater bot db457b324b Localisation updates from http://translatewiki.net.
Change-Id: Ifd2df38fa4e657f22976fab4075ef2dfba5a959b
2012-07-08 19:21:29 +00:00
Translation updater bot 2307b88171 Localisation updates from http://translatewiki.net.
Change-Id: I6d61892a816f57b9281e74ca4168f184ecee3a5c
2012-07-06 21:19:07 +00:00
Translation updater bot c7a6101081 Localisation updates from http://translatewiki.net.
Change-Id: I692e0ae9f7bbbb0a38f285f004d96c9f0f3e1a1a
2012-07-01 14:03:44 +00:00
Liangent 33e11bae86 Fix Change I6d548d06, redo Change I23407ae6: Add one more space
Change-Id: I8cc9d7320dcd948bfedc2b3d6d7e76bcfd682037
2012-06-29 13:45:38 +08:00
Brion VIBBER 022da5c3a5 Merge "(bug 36059) Double escaping of html characters in Math module" 2012-06-25 19:25:13 +00:00