Until now, all unit tests were defined in Tests.hs. Pro: simple, makes
code/test line counting easy. Con: tests are far from code, Tests.hs turns
into a big wall of test code. Now, unit tests can also be defined in modules.
To avoid name clashes and template haskell complexity, a dumb manual
naming scheme is used: any module may export a hunit Test(List) named
tests_ModuleName. These are manually aggregated and re-exported when
appropriate, eg in Commands.All and finally in Tests.hs.
Previously, we supported "hledger add [DESCRIPTION]". A DESCRIPTION just
pre-filled the description field and bypassed that prompt, after which
existing transactions with similar descriptions were offered as
defaults/reminders.
Now, we support "hledger add [ACCOUNTPATTERN]" instead. After the
description prompt, existing transactions with similar descriptions *and*
which match ACCOUNTPATTERN are offered as defaults. This can be helpful eg
with a multi-person ledger, to match only your own transactions.
Mixed positive and negative balances were confusing things. Now, the chart
will omit any balances which do not match the sign of the first balance.
Various other size/font/colour tweaks.
Charts are now red for positive balances (like expense accounts) and green
for negative balances (like income accounts). This is fun, but falls down
for eg assets and liabilities.. better ideas welcome.
We now do data filtering/massage as late as possible, not just once at
startup. This should work better for multiple commands, as with web or ui.
The basic benchmark seems at least as good as before thanks to laziness.
With this change, Transactions and Postings reference each other
co-recursively. This makes constructing them more tedious, but it
may also allow LedgerPostings to be dropped and code to be simplified.
Time and space performance of register and balance is as before.