Brion Vibber
61bb13a24a
Followup r80375: let PreprocessorTest work on Preprocessor_Hash etc as well as Preprocessor_Dom
...
Using same technique as ApiExpandTemplates to serialize the object tree back to XML, rather than asking for the DOM implementation's internal XML return function.
Have to also perform normalization on the test cases, as they aren't normalized to what libxml2 serializes. :P
Note that there are 4 test failures currently with Preprocessor_Hash, as it makes a separate <equals> element around = which doesn't appear to be in Preprocessor_Dom's output.
2011-10-15 20:21:52 +00:00
Aaron Schulz
23d5a27e2e
Reverted r86072, r86419 per CR. Lots of conflicts resolved here. Removes lineStart from r87346 code as well for preprocess parser tests.
2011-09-12 19:16:22 +00:00
Platonides
e849a1f153
Tag names can't contain template parameters (thanksfully)
2011-05-04 14:40:25 +00:00
Platonides
cbceed01fa
Follow up r87220. r86795 tests are now embedded into PreprocessorTest.php
2011-05-03 19:53:13 +00:00
Platonides
c6a8d96092
We can't check if it's a parentNode->type == name_node so early, since
...
it may be just a single } and end up being a literal.
2011-05-03 19:48:50 +00:00
Platonides
e5a26f3460
Convert r86795 tests into a dataProvider
2011-05-01 21:33:16 +00:00
Mark A. Hershberger
2e6a9b9cea
* Add preprocessor tests that Bergi supplied for Bug #28642
...
* Add Bergi to CREDITS
2011-04-23 21:26:04 +00:00
Mark A. Hershberger
7d90f16834
Use assertStringEqualsFile in place of assertEquals and reading the file.
2011-04-23 21:21:02 +00:00
Mark A. Hershberger
e8ccedbbf0
missed some w/s
2011-04-23 21:18:50 +00:00
Mark A. Hershberger
6c3d0e056e
w/s cleanup
2011-04-23 21:18:22 +00:00
Platonides
9f63d96785
Change tests to match preprocessor changes in r86072.
...
sed -i 's/<root><\(template\|tplarg\)>/<root><\1 lineStart=\\"1\\">/' phpunit/includes/parser/PreprocessorTest.php
sed -i 's/<root><\(template\|tplarg\)>/<root><\1 lineStart="1">/' parser/preprocess/*.expected
2011-04-19 18:39:37 +00:00
Platonides
25a338f5e0
Add a couple of brace test cases.
2011-03-30 17:41:58 +00:00
Platonides
fd84fbf739
Fix problem when running a fakePipeFound, which could lead to literals being incorrectly added to the part node instead of the value node.
2011-02-05 20:05:00 +00:00
Platonides
86a4780482
Missed the case where there is an equals.
...
It's ugly having to add that literal node there.
2011-01-24 22:10:22 +00:00
Platonides
70856c881a
Silly bug with value nodes.
2011-01-24 19:40:25 +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
Platonides
f6763bdb88
The << operator (level 7) has greater priority than bitwise or (level 12),
...
which makes getNextSibling() function wrong for values >= 256.
2011-01-21 22:00:07 +00:00
Platonides
0745a738b1
The pipes were no recognized after a link. A one line fix in the code :)
2011-01-19 20:46:00 +00:00
Platonides
63eea0f737
Follow up r80461. In some cases the closing tags for internal tags were not recognised.
2011-01-17 23:12:07 +00:00
Platonides
8081138adb
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.
2011-01-17 19:54:44 +00:00
Platonides
a8dce135d9
Another couple of tests. Also passed by the NtPrepro :)
2011-01-16 18:20:44 +00:00
Platonides
0127c7c446
Add preprocessing tests
2011-01-15 08:35:56 +00:00