The fix for bug #713 changes the way capital gains as well as basis costs
are shown. All of these tests use the same input file, which includes
capital gains and losses. The tests are too long to update and verify
manually but I verified some files and believe the output is correct.
I've therefore updated the tests with the output of the fixed ledger.
Let's take baseline/opt-lot-dates.test as one example. In the past,
ledger generated the following incorrect Equity entries:
190.42G Equity
236.83G Capital Gains
-46.41G Capital Losses
If you compare the end of the diff of the test, you'll see:
- 35.42G
+ -155.00G
The difference is: 35.42 - -155.00 = 190.42
This matches exactly the Equity entries previously generated, which
shouldn't be there.
John's fix for bug #713 changes the way basis cost are calculated.
The patch also fixes#712, which caused ledger to create automatic
Equity:Capital Gains that were not correct. Update the test cases
accordingly after verifying the new output.
When a cost was specified without a whitespace after the @ symbol,
as in @$5.01, this was incorrectly parsed as 5.01 (losing the
commodity) rather than $5.01.
Bug fix for #1050
A wrong query string was generated by "select account": one ansify_if()
too much was listed and justify() was called with the wrong parameters.
Bug fix for #744
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.
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.
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.