Commit graph

36 commits

Author SHA1 Message Date
Brion Vibber
4e0552070f Fix content language message cache (table of contents test depends on this) 2004-10-27 10:25:21 +00:00
Brion Vibber
08ce3ddaad * Add --help and --quiet options to parser test runner
* Standardize the image: tests on Foobar.jpg
* Create a dummy Foobar.jpg during testing
2004-10-27 09:21:25 +00:00
Tim Starling
4e40d5a049 Fixing behaviour with a table prefix 2004-10-24 08:04:18 +00:00
Tim Starling
3d6bb721af Replacing obsolete Database member functions. 2004-10-24 07:30:03 +00:00
Tim Starling
1aa60b1361 Fixing multiple-inclusion problems 2004-10-24 02:13:00 +00:00
Brion Vibber
700657227f Clean up options code a bit to make use of commandLine.inc's parsing 2004-10-18 08:11:06 +00:00
Wil Mahan
ad1e200392 Now it is no longer necessary to create an OutputPage
object, because Parser replaces link placeholders.
This also means that tidy happens automatically
on the parser output if $wgUseTidy = true.
2004-10-15 17:46:42 +00:00
Wil Mahan
75d16c99a6 Pass the -a option to diff in case there are tests with
non-text characters; set wgMaxTocLevel global; use
.PHONY target in Makefile in case someone happens
to have a file named 'test' or similar in the
maintenance/ directory.
2004-10-11 21:55:35 +00:00
Antoine Musso
03956be765 --color=light will bright diffs output 2004-09-30 17:39:57 +00:00
Brion Vibber
4b12fd8e49 Finish fixing parser test on PostgreSQL (bug 585)
Add all necessary interwikis to the test db manually rather than copying the host's.
2004-09-29 07:35:55 +00:00
Wil Mahan
138399ad00 stupid PostgreSQL insists on parentheses :) 2004-09-29 05:53:01 +00:00
Wil Mahan
f3f0f6fb30 1) Use CREATE TEMPORARY TABLE ... LIKE for MySQL >= 4.1
and PostgreSQL (untested, but should fix bug 585). Use a
hack for older MySQL versions that doesn't require including
a .sql file.
2) Die gracefully when an article has an invalid title or
already exists in the database.
3) Detect and report duplicate sections in the test file.
2004-09-27 21:14:52 +00:00
Wil Mahan
282c3b0159 Work with $wgUseTidy again, and add more tests (we now have 100!) 2004-09-25 21:20:32 +00:00
Brion Vibber
9f87d33e17 Set wgUploadPath for tests so we don't all have to be using Wil's filesystem layout. ;) 2004-09-25 09:49:04 +00:00
Wil Mahan
2851381491 Add a "--regex" option to limit which tests are run; replace
"!!disabled" with "!!option ... disabled"
2004-09-25 05:58:05 +00:00
Wil Mahan
62dec72993 Add an option for setting the title; add test for interlanguage links;
remove dupliate test
2004-09-24 21:49:56 +00:00
Wil Mahan
0a012f372b Add tests for subpages (+ an option to enable them), images,
more template cases, definition lists/indentation, and
preformatted text.
2004-09-24 20:56:45 +00:00
Brion Vibber
6797dd498b Add a pretty PASSED! or FAILED! to the final summary line. 2004-09-24 05:05:53 +00:00
Wil Mahan
be57cf05df Be a bit more careful about trailing spaces; don't colorize output
when stdout is not at terminal; add a reminder to check for
duplicate/invalid test articles.
2004-09-24 04:19:57 +00:00
Brion Vibber
3f6f15c2cc Break temporary table creation out to setupDatabase() function.
Tweak so that the temporary prefix will actually be used.
2004-09-23 22:23:28 +00:00
Wil Mahan
36e54b1a1d Two changes to parserTest:
1) Use 'parsertest' database prefix and temporary tables to allow
creating articles for testing without modifying the normal DB.
Right now this is ugly because the new tables have to be created by
hand.
2) Allow tests to specify articles using !!article ... !!text
... !!endarticle syntax. This is useful for templates, categories,
and I hope more tests.
2004-09-23 21:52:09 +00:00
Brion Vibber
42e412eba5 Add phpdoc comments 2004-09-23 08:25:30 +00:00
Brion Vibber
c055fd5d9b Load up LanguageUtf8 and force to utf-8 if config was latin1 2004-09-23 07:32:54 +00:00
Brion Vibber
bf86ceaa32 Change name of output files to make the diff output a bit clearer 2004-09-23 07:05:37 +00:00
Brion Vibber
5736e97220 Set language to en for tests. 2004-09-23 07:04:06 +00:00
Wil Mahan
c0dcc34ac4 add $wgSitename global for testing magic variables 2004-09-23 06:43:43 +00:00
Brion Vibber
64759116ca Add --quick option to suppress display of diffs. 2004-09-23 05:45:17 +00:00
Brion Vibber
433b60786b Add color to the output; assumes a more or less ANSI-flavored terminal.
Won't display color on Windows by default; use --color or --color=no to override.
2004-09-23 05:40:10 +00:00
Brion Vibber
52441affd5 Add a newline to the diff temp files to remove the annoying message about it 2004-09-23 02:30:56 +00:00
Brion Vibber
5c451dde19 Cleaning up checkin conflict: remove Wil's parserTransform() function as
this is superceded by setting the globals to a known initial state.
2004-09-23 00:45:49 +00:00
Brion Vibber
53e91fec8c Parser test improvements:
* Show a diff of the expected and actual output rather than dumping large swaths of HTML
* Set exit code depending on success
* Standardize some global settings such as the URL paths which affect output
* Added copyright/GPL notice to test script code
2004-09-23 00:33:07 +00:00
Wil Mahan
7186524e11 allow simple variables in expected test results; use tidy on expected result when
$wgUseTidy is enabled, which makes it possible to disregard cosmetic formatting
discrepancies
2004-09-23 00:30:28 +00:00
Wil Mahan
faefe215e1 Use OutputPage to replace link placeholders; add links, quotes tests
(not working at the moment)
2004-09-22 21:54:19 +00:00
Wil Mahan
dd92d82b11 Remove the comment check I added (wasn't necessary); add a way do disable tests.
Add nowiki, comment, and external links tests (some disabled at the moment).
2004-09-22 21:22:51 +00:00
Wil Mahan
0d35bb7770 Allow comments beginning with '#' between sections, for more detailed
descriptions of the tests.
2004-09-22 19:46:51 +00:00
Brion Vibber
52ab994391 Quick start on a mindlessly simply parser test suite.
Works on a standalone parser object, not through the globals or the web interface, which is created anew for each test. Pretty primitive so far, but this at least allows accumulation of tests for now.
2004-09-22 12:25:40 +00:00