Commit graph

650 commits

Author SHA1 Message Date
Martin Michlmayr
60d9c2bc1d Remove trailing whitespace from error messages
Fix for bug #867
2014-05-13 18:08:34 -04:00
Martin Michlmayr
c411792edb Add test case or new payee uuid feature 2014-05-13 18:03:48 -04:00
Martin Michlmayr
9b99a1a9cb Add a test for an error in an included file 2014-05-13 11:04:48 -04:00
Martin Michlmayr
e7af7c45bd Update Python tests for fix for bug #383 2014-05-13 10:16:30 -04:00
Martin Michlmayr
b99d8d615a Add test cases for bug #494
The issues raised in bug #494 are no longer there but let's add some
test cases.
2014-05-13 09:24:26 -04:00
Martin Michlmayr
0c9e188cfb Honour date-format for lot dates
Fixes bug #383
2014-05-13 00:03:39 -04:00
Martin Michlmayr
e92527e4da Add another test case for bug #999 2014-05-12 12:59:53 -04:00
Martin Michlmayr
56cf72ed0a Add more --pivot tests 2014-05-11 10:00:53 +02:00
Martin Michlmayr
cc7d0c82ea Add tests for the --pivot option 2014-05-11 01:03:16 +02:00
John Wiegley
bd8a1a6756 Use the POST_COST_VIRTUAL flag when exchange commodities
Fixes #999
2014-05-08 14:28:07 -05:00
John Wiegley
94468d21b8 Temporarily disable the DocTests 2014-04-17 14:57:00 -05:00
John Wiegley
3435a81b67 Correct one of the baseline tests 2014-04-14 11:41:52 -05:00
John Wiegley
0d23e3d4f6 Apply any outstanding deferred postings at the end of parsing 2014-04-14 11:08:26 -05:00
John Wiegley
8f8a94c28e Add the concept of "deferred postings"
This is pretty much exclusively for allowing one to use balance
assertions with replicated transactions across multiple files.
2014-04-13 23:26:14 -05: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
Peter Feigl
75b0a5d8ff Adding option --recursive-aliases, adding documentation to man-page and manual 2014-02-26 09:29:31 +01:00
Peter Feigl
230fa31ba3 Adding tests for recursive aliases 2014-02-26 01:30:45 +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
e7cfaa1e65 Fix apply_year_directive
Using the Y 2014 syntax works fine, but using
apply year 2014 resulted in the following error:
Error: Year is out of valid range: 1400..10000
since part of the given year string was chopped off.
2014-02-12 10:38:07 +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
Johann Klähn
89c21e9967 build shared library/python module, clean up CMake
libledger will now be built as a shared library. You can 'import ledger'
from python IFF you copy libledger.so to ledger.so or create a symlink.
2014-02-01 01:30:53 +01:00
Craig Earls
9a142ca656 Corrected discrepancies between documentation and drewr3.dat regarding apply and bucket 2013-09-07 10:17:46 -07:00
John Wiegley
8d1067c89c Disable three tests preventing Jenkins from succeeding
These aren't actually failures, just issues with the way that Jenkins
works on my system (mainly because ~/.jenkins is a symlink pointing at
another volume).
2013-06-19 13:49:10 -05:00
John Wiegley
fe810fa13f Revert "Fix tests when running under Jenkins"
This reverts commit 7183dabc84.
2013-06-08 19:00:04 -05:00
John Wiegley
7183dabc84 Fix tests when running under Jenkins 2013-06-08 18:55:14 -05:00
John Wiegley
9f68d1799a Fix test/input/drewr3.dat 2013-05-23 04:02:24 -05:00
John Wiegley
a79cf36c64 Fix #784 2013-05-23 03:23:49 -05:00
John Wiegley
82345899f7 Remove some unnecessary and complicated logic
Fixes #712
2013-05-19 03:38:20 -05:00
John Wiegley
2f91900009 Add unit test for 686 2013-05-19 02:56:10 -05:00
John Wiegley
cb694a3c5e Get the unit tests passing again 2013-05-19 02:14:27 -05:00
Craig Earls
e5dd5344ef Initial commit of ledger-mode documentation and demo file 2013-02-26 15:36:54 -07:00
Craig Earls
19eb2cab1b Divorces 25A099C9 from the actual amount.h source file
This test appears to test the garbage input handling on ledger.
garbage-input.dat has been added to the test directory for use by this
test, allowing development with amount.h to proceed without tripping
this particular test inappropriately
2013-01-30 16:43:47 -07:00
Craig Earls
f9da94c909 Fixes bug 514. accounts and commodities output now sorts
updated tests included.
2013-01-29 10:03:47 -07:00
Johann Klähn
b3b11bed3b Merge branch 'master' into next
Some commits were on the master branch but not yet on the next branch due to a
pull request to master after those two branches diverged. This merge
ensures that next ⊇ master.
2013-01-18 18:26:03 +01:00
Johann Klähn
3fe2ef5956 change handling of standard input
For `-f /dev/stdin`, the `pathname` of the parsing context will be empty
as for any other streamed input.

`instance_t::include_directive` did not work as expected for `-f /dev/stdin`
and relative file names. One would expect them to be relative to the current
directory rather than `/dev`.

This will lead to `While parsing file ""` messages. This could be
adjusted to read `While parsing standard input`, but maybe it's not
worth the special cases.

This commit also fixes bug 788: behaviour of source_context for '-f -'
2013-01-17 12:19:23 +01:00
Johann Klähn
ea249423d4 allow -f /dev/stdin in test runner 2013-01-17 12:08:20 +01:00
Johann Klähn
74a1f63efb fix ctest rules 2013-01-17 09:30:36 +01:00
John Wiegley
d1c96190e9 Revert "fix bug 788: behaviour of source_context for '-f -'"
This reverts commit 0a1ff03542.
2013-01-16 18:10:30 -06:00
Johann Klähn
d922f46595 fix bug 748: option aliases not recognized 2013-01-15 23:30:17 +01:00
Johann Klähn
0a1ff03542 fix bug 788: behaviour of source_context for '-f -'
`session_t::read_data` did not set context.pathname to `/dev/stdin`
for the special case `-f -`. I chose to adjust `source_context` too
as there is no sensible context if no file name is provided.
2013-01-15 23:03:39 +01:00
Johann Klähn
a633bc7fce add unit tests for amount_t→floor/ceil 2013-01-15 21:17:11 +01:00
John Wiegley
3445ddec09 Merge branch 'next' of github.com:ledger/ledger into next 2012-11-26 12:52:12 -06:00
Alexis Hildebrandt
6a5d6a88cd Fix crash when accessing the transaction code via post.xact.code using python
ledger would abort with the following error message:
  TypeError: No Python class registered for C++ class boost::optional<std::string>

The changes pass a CallPolicy to make_getter when adding the transaction
code property for python, so that the correct to_python conversion is
made. For details see:
http://www.boost.org/doc/libs/1_52_0/libs/python/doc/v2/faq.html#topythonconversionfailed
2012-11-19 23:00:58 +01:00
John Wiegley
484e54c2b3 Fixed a regression test 2012-11-12 02:30:04 -06:00
John Wiegley
de729114d1 Merge pull request #92 from kljohann/bugs.bucket
fix bucket directive (bug 765)
2012-10-25 12:50:30 -07:00
Johann Klähn
e824070b4a fix bucket directive (bug 765)
This was caused by both 'A' and 'bucket' using
default_account_directive. This function was still stripping the 'A'
directive, so the first character of the account name used with 'bucket'
was cut off. Maybe the code for the other directives should be changed
accordingly for consistency (put line + 1 in call instead of function).
2012-10-23 12:13:22 +02:00