Commit graph

13 commits

Author SHA1 Message Date
Alexis Hildebrandt
3d7eb24151 [doc] Improve @smallexample command line parsing
by using Python shlex.
2015-01-27 22:01:09 +01:00
Alexis Hildebrandt
47dbddf5af [tests] Capture stderr when running DocTests 2015-01-21 10:32:50 +01:00
Alexis Hildebrandt
c7a30bf7d8 [tests] Refactor CheckTests.py into custom scripts 2015-01-21 08:03:53 +01:00
Alexis Hildebrandt
abf41d727a [tests] Add examples parameter to DocTests
to test the given examples only instead of every example.
2014-12-30 11:15:23 +01:00
Alexis Hildebrandt
4f1a5b5770 [test] Use --args-only option in DocTests.py
instead of --init-file /dev/null
2014-12-24 10:08:43 +01:00
Alexis Hildebrandt
936c3f0434 Fix DocTests running in non-standard width terminal
The changes introduced with
  56976a127c make --columns default to
  terminal width, as returned by ioctl()
break the DocTests when run in a terminal with a width different
from the standard of 80 columns.
2014-12-03 22:14:49 +01:00
Peter Feigl
831c064c38 Added support for validation tests to DocTest.py (input:validate and
command:validate)

It is now possible to use @smallexample @c input:validate (and
command:validate) to specify that an example should just be read by
ledger (and checked for errors) or that a ledger command should be
executed (with default input -f sample.dat, if none is specified).

These annotations have been added into ledger3.texi where appropriate.

Running the ledger3.texi test now takes a second or two, but a lot of
the @smallexamples are now automatically tested.
2014-03-04 10:05:09 +01:00
Alexis Hildebrandt
3d9faef448 DocTests: Allow inline input to be used with different example commands 2014-02-19 06:52:43 +01:00
Alexis Hildebrandt
90988feebc DocTests: Allow multiple example inputs
to be used as single ledger data for an example command
2014-02-19 06:52:43 +01:00
Alexis Hildebrandt
c566afe3b1 Add proper argument parsing to DocTests.py 2014-02-09 07:28:58 +01:00
Alexis Hildebrandt
960ebc2a57 Print summary list of failed doc tests if any 2014-02-09 07:20:03 +01:00
Alexis Hildebrandt
a1cc8ca15a Add support to check documentation examples with inline data 2014-02-07 18:39:35 +01:00
Alexis Hildebrandt
fbbb379fe0 Check examples in documentation when running tests
The DocTests.py script will parse a given texinfo file for specially
marked examples, run the ledger command from the example, and check
the result against the example output from the documentation.
2014-02-07 00:21:38 +01:00