ledger/test
John Lee de1b48a013 Fix bug where .total used in value exprs breaks totals
* Re-initialize (to VOID) totals for the account and its ancestors on adding
  postings.  Otherwise the cache intended for use by recursive calls of C++
  function total() in computing family (i.e. account hierarchy) totals is
  incorrectly retained from one top-level call to the next, causing
  inconsistent and broken behaviour.

* Re-initialize (to false) calculated and gathered.  Otherwise we won't
  e.g. recalculate stale totals for ancestor accounts (e.g. won't recalculate
  Assets:Savings total if Assets:Savings changes via a posting).

Although the value expression total function is used by ledger itself in
computing totals, this bug would only appear on use of .total in user-supplied
value expressions computed *during parsing* of ledger files, rather than after
parsing (I believe ledger only ever calls it for internal purposes after
parsing is complete).

It is possible this bug also affected other functions than total (perhaps even
in circumstances other than analagous to that described in the preceding
paragraph).  I have not checked that.
2017-10-26 22:35:24 +01:00
..
baseline typo in docs 2017-01-27 22:07:01 +03:00
input Add regress test for bugs 550 and 584 2017-01-05 20:16:17 +01:00
manual Enable the baseline and manual tests 2012-05-20 05:01:17 -05:00
python Started writing Python unit tests 2012-03-01 05:50:07 -06:00
regress Fix bug where .total used in value exprs breaks totals 2017-10-26 22:35:24 +01:00
unit Fix build under Cygwin. 2016-09-29 21:46:45 +03:00
CheckBaselineTests.py --force-color is now tested in CheckBaselinetests.py 2016-10-27 22:05:49 +02:00
CheckComments.py Created a script to check commenting coverage 2010-06-15 21:32:05 -04:00
CheckManpage.py [doc] Report undocumented value expression functions 2015-01-27 22:02:59 +01:00
CheckOptions.py Add missing known functions to test 2015-07-28 17:30:00 -04:00
CheckTexinfo.py [doc] Report undocumented value expression functions 2015-01-27 22:02:59 +01:00
CMakeLists.txt [tests] Set timezone for running tests 2015-08-07 19:42:23 +02:00
ConfirmTests.py Added a test harness error diagnostic 2012-03-30 04:49:45 -05:00
convert.py [misc] Update year in copyright notice to 2017 2017-01-05 12:56:35 +01:00
DocTests.py Fix test harness to work with msys2 2016-09-23 08:14:30 -04:00
fullcheck.sh Corrected an uninitialized memory bug 2012-03-19 22:28:00 -05:00
garbage-input.dat Divorces 25A099C9 from the actual amount.h source file 2013-01-30 16:43:47 -07:00
GenerateTests.py [doc] Add CheckTests to ctest 2015-01-15 14:53:16 +01:00
LedgerHarness.py Fix test harness to work with msys2 2016-09-23 08:14:30 -04:00
PyUnitTests.py Added skeletons for Python unit tests 2012-02-29 22:13:07 -06:00
RegressTests.py Fix test harness to work with msys2 2016-09-23 08:14:30 -04:00