summaryrefslogtreecommitdiff
path: root/test/spec_tests.py
AgeCommit message (Collapse)Author
2020-05-12Revert "spec_tests.py: ignore line endings on diff."John MacFarlane
This reverts commit 54c990d17385156958556d86feca0c6e24da94e7.
2020-05-12spec_tests.py: ignore line endings on diff.John MacFarlane
2020-05-12Revert "spec_tests.py: don't keep line endings (for windows CI)."John MacFarlane
This reverts commit abc45c57d368383eb05ca5fbb79d33b0370b419c.
2020-05-12spec_tests.py: don't keep line endings (for windows CI).John MacFarlane
2020-01-15Remove useless __name__ check in test scriptsNick Wellnhofer
These checks don't seem to be required and broke pathological_tests.py on Windows where multiprocessing sets __name__ to "__mp_main__".
2016-06-02spec_test.py - parameterize do_test with converter.John MacFarlane
2016-06-02spec_tests.py: exit code is sum of failures and errors.John MacFarlane
2016-03-28Add first regression testsNick Wellnhofer
I think it's a good idea to add tests after fixing bugs. This is really easy using the spec test infrastructure.
2016-01-10Updated spec.txt and spec_tests.py to new format.John MacFarlane
2015-07-09Fixed small bug in test runner.John MacFarlane
(Error printing errors from the test program.)
2015-07-08spec_tests.py: use stdout.out.buffer.write instead of print throughout.John MacFarlane
Mixing them didn't work well; results were out of order.
2015-07-07Updated spec_tests.py from jgm/CommonMark.John MacFarlane
This forces utf-8 encoding.
2015-07-03`spec_test.py`: changed default to `spec.txt` (not `test/spec.txt`).John MacFarlane
This doesn't matter, since we specify the argument anyway. But it brings this into sync with the version in CommonMark.
2015-06-16spec_tests.py: allow → for tab in HTML examples.John MacFarlane
2015-06-03Revert "Hacks to spec_tests.py to test CRLF support."John MacFarlane
This reverts commit 6f99ff72519a34517285b070cb222de42d8acdfd. We'll add a separate test for line endings.
2015-04-07Hacks to spec_tests.py to test CRLF support.Ben Trask
2015-01-24Moved spec.txt to test/ directory.John MacFarlane
2014-12-31Fix spec tests on WindowsNick Wellnhofer
2014-12-29Updated tests to use python3.John MacFarlane
2014-12-24Use python2 for man, test scripts.John MacFarlane
Closes #251.
2014-12-23Made spec_tests.py more DRY.John MacFarlane
Factored test selection logic out of do_tests. Eliminated do_tests, putting the (now very short) code into main. Improves 1ba4822 @cirosantilli
2014-12-22spec_tests.py: make --dump-tests sensitive to --pattern, --number.John MacFarlane
Closes #249 in a slightly different way.
2014-12-22Merge pull request #248 from cirosantilli/short-optionsJohn MacFarlane
spec_tests add short options for common parameters
2014-12-22Merge pull request #247 from cirosantilli/run-single-test-by-numberJohn MacFarlane
Add --number option to run a single test by its id
2014-12-22Slight improvement to #250.John MacFarlane
Indicate which is expected and which is actual output.
2014-12-21Don't raise exception on invalid UTF-8 outputCiro Santilli
This could be reproduced with: ./test/spec_tests.py --program kramdown --pattern Enti with Kramdown version 1.5.0. The main problem is that it would stop future tests from being carried out. After this commit it is just counted as a failure. The error message printed is of the form: Unicode error: 'utf8' codec can't decode byte 0xfc in position 8: invalid start byte '<p># \xd3\x92 \xcf\xa0 \xef\xbf\xbd</p>\n' '<p># \xd3\x92 \xcf\xa0 \xfc\x85\xb8\xb0\xa9\xb8</p>\n'
2014-12-21spec_tests add short options for common parametersCiro Santilli
2014-12-21Add --number option to run a single test by its idCiro Santilli
Do not check input validity, e.g. input `>` number of tests, because other inputs don't check it either, e.g. `--pattern`. If given, the summary line will be like: 1 passed, 0 failed, 0 errored, 509 skipped
2014-12-01make the diff output workCarsten Brandt
2014-12-01fixed python scriptCarsten Brandt
all these variables are not defined and have to be extracted from `test`. Running the script this way resulted in error: ``` python cmm/test/spec_tests.py --spec cmm/spec.txt --program "./bin/markdown --flavor=common" Traceback (most recent call last): File "cmm/test/spec_tests.py", line 137, in <module> if do_tests(cmark, tests, args.pattern, args.normalize): File "cmm/test/spec_tests.py", line 114, in do_tests result = do_test(test, normalize) File "cmm/test/spec_tests.py", line 47, in do_test print_test_header(headertext, example_number,start_line,end_line) NameError: global name 'headertext' is not defined ```
2014-11-29More code cleanup in spec_tests.py.John MacFarlane
2014-11-29Reorganized code in spec_tests.py.John MacFarlane
2014-11-29test: Factored out normalization code into normalize.py.John MacFarlane
2014-11-29spec_tests.py: if dump_args, don't try to load dynamic library.John MacFarlane
2014-11-29Factored out cmark.py from test programs.John MacFarlane
2014-11-29Moved testing programs to test/.John MacFarlane
Added test/CMakeLists.txt.