Commit graph

265 commits

Author SHA1 Message Date
John Wiegley
021fc50842 Corrected two tests 2011-02-12 18:14:30 -05:00
John Wiegley
9c62463f84 Changed testing format to aid with debugging 2011-02-12 18:11:26 -05:00
John Wiegley
512542552b When a test fails, show the command that failed 2011-02-12 17:55:56 -05:00
John Wiegley
a69cd37fa2 Corrected regression test output 2011-02-12 17:55:56 -05:00
John Wiegley
61f11bab17 Removed needless "=== 0" and ">>>2" lines from test files 2011-02-12 17:55:55 -05:00
John Wiegley
c5352f09a4 Simplified an else clause in test/run 2011-02-04 19:19:09 -05:00
John Wiegley
c313cee085 Fixed several unit tests 2011-02-04 04:40:31 -05:00
John Wiegley
2a2c3c1cec Use Boost.Test instead of CppUnit 2011-02-04 03:43:33 -05:00
John Wiegley
c00188d6a8 Increase display precision of hours to 2 places 2010-12-12 19:13:44 -05:00
John Wiegley
8626409678 Removed test/input/speed-test.dat 2010-11-26 19:02:07 -05:00
John Wiegley
ff07cc6c6f Added regression test for 7C44010B 2010-08-16 16:28:08 -04:00
John Wiegley
4d155045a0 Added regression test for 9EB10714 2010-08-16 16:24:37 -04:00
John Wiegley
48a5823181 Based symbol_needs_quotes an invalid_chars (#386) 2010-07-29 03:45:01 -04:00
John Wiegley
4d1eea90c5 Added baseline test for "check" feature 2010-06-26 01:17:08 -04:00
John Wiegley
64c6329b5d Added baseline tests for --meta and --meta-width 2010-06-26 01:07:30 -04:00
John Wiegley
e8fe3649c2 Added baseline test for --now 2010-06-26 01:04:32 -04:00
John Wiegley
c78f84cef2 Added baseline tests for prepend-format/width 2010-06-26 00:58:30 -04:00
John Wiegley
a995090b9e 'make check' for gcov shouldn't listen to -j 2010-06-23 17:51:11 -04:00
John Wiegley
8ced9df08f Added a command-line test runner named test/run 2010-06-22 21:57:23 -04:00
John Wiegley
0648c2f6dc Extended feat-fixated-prices.test 2010-06-22 21:03:04 -04:00
John Wiegley
266dee564f Price annotation no longer inject an implied cost
Consider the following transaction:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage

Previously, this would have been equivalent to:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL @ $30
      Assets:Brokerage

However, this is not always what the user expects to happen.  When @ is
not being used, the transaction should reflect a mere transfer of
commodities.  This is now how it works, and thus the above transaction
is now equivalent to the following instead:

  2010-06-22 Sample
      Assets:Brokerage       10 AAPL {$30}
      Assets:Brokerage      -10 AAPL {$30}
2010-06-22 20:56:35 -04:00
John Wiegley
7da2701295 Regression and generate tests now fail properly 2010-06-22 03:10:19 -04:00
John Wiegley
81bf38584e Added new --bold-if option 2010-06-22 01:27:05 -04:00
John Wiegley
1c0785ce78 Fixed typo in previous commit's regression test 2010-06-21 18:35:51 -04:00
John Wiegley
963161a817 bal was sometimes reporting empty accounts 2010-06-21 18:32:03 -04:00
John Wiegley
2f1b1c8ced Change weighting of account-name abbreviation
Parent accounts are abbreviated even more, so that child accounts can
show more text.
2010-06-21 18:05:26 -04:00
John Wiegley
4ea4fa24a4 Added a regression test for the previous commit 2010-06-21 17:54:26 -04:00
John Wiegley
009e07690d Added tests for sole budget/forecast reports 2010-06-21 13:25:17 -04:00
John Wiegley
96b652310c Don't warn about --import in doc when --no-python 2010-06-20 20:35:35 -04:00
John Wiegley
d15bb66ee4 Added missing call to resolve_end() in find_period 2010-06-20 20:29:56 -04:00
John Wiegley
82e43fe125 If fixated price commodities are mixed, show them
For example, if a Ledger file contains transactions with the use of both
EUR and EUR {=PRICE}, then regular reports will always show the
{=PRICE}, disabling the by-name commodity merging that takes place.  In
brief, fixated and non-fixated commodities are now non-mergable.

If a file contains all of one, or all of the other, they will still be
merged, since these separate usages do not conflict the way that fixated
and non-fixated together do.
2010-06-20 20:29:53 -04:00
John Wiegley
fa36fef4fa Regression test for last commit 2010-06-20 17:09:07 -04:00
John Wiegley
6770380b6d Subsantial fixes and improvements to budgeting
1. A bounded budget "from DATE to DATE" will now generate entries
    throughout that entire range, if it is triggered.

 2. An unbounded budget begins, as before, in the timeframe of the
    reported posting which triggered it, but now continues until the
    present date.
2010-06-19 16:07:59 -04:00
John Wiegley
b819475a93 Fix to the way simplified regressions tests are read 2010-06-19 16:06:15 -04:00
John Wiegley
7995e16762 Corrected a bug in report query parsing 2010-06-19 14:02:44 -04:00
John Wiegley
5da1e7756d Added new option --inject=KEY[,KEY...]
If you have a typed metadata key which contains an amount, you can use
--inject=KEY to inject a posting with that amount wherever a match
occurs.  There are two main forms of usage:

  2010-06-18 Sample
      ; Key:: $100
      Expenses:Food                $100.00
      Assets:Checking

The command would be:

  ledger reg --inject=Key

In the above, transactional form, a posting under the account "Key" will
be injected before the first posting reported for this transaction.
It's amount will be $100.  This only happens once for the whole
transaction.

It is also possible to associate the key with a posting:

  2010-06-18 Sample
      Expenses:Food                $100.00
      ; Key:: $100
      Assets:Checking

Now the injected posting is generated whenever that particular post is
reported.
2010-06-18 02:28:12 -04:00
John Wiegley
36ed7f744f Created a script to check commenting coverage 2010-06-15 21:32:05 -04:00
John Wiegley
35ca4f0bb0 Ensure that all options are tested and documented 2010-06-15 18:19:54 -04:00
John Wiegley
34fcc62b4d Removed unused --unsorted option 2010-06-15 04:34:16 -04:00
John Wiegley
fa263e729c Tests run in parallel with using acprep -jX make
This is done using the multiprocessing library in Python 2.6.  If that's
unavailable, this feature does nothing.
2010-06-15 01:49:18 -04:00
John Wiegley
c367dcab82 Improved algorithm for abbreviating account names 2010-06-14 07:20:23 -04:00
John Wiegley
d11ff33074 Made >>>2 and === optional in regression tests 2010-06-14 07:18:49 -04:00
John Wiegley
e78af146e8 Corrected bug with forecasting date bounded xacts 2010-06-13 23:41:50 -04:00
John Wiegley
b1b4e2aadf Add support for typed metadata
The metadata construct 'Key: Value' is now just a special case for
'Key:: "Value"'.  Another after a :: in metadata setting is parsed as a
full value expression and typed as such.  For example:

  ; Key:: $400 + $500

  ledger -l 'tag("Key") < $1000'
2010-06-12 15:43:00 -04:00
John Wiegley
a1fc3c5cfe The --anon option now randomizes its effect 2010-06-12 14:43:40 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
c28fad384c The --anon option now anonymizes commodities
Fixes #227 / 1C90D8AF-830E-43C2-A5B7-D382F68EBDE3
2010-06-09 07:47:45 -04:00
John Wiegley
8637dd6ccf New display flag AMOUNT_PRINT_ELIDE_COMMODITY_QUOTES
This is used by reports like register and balance so that separated
commodities without spaces in them needed be surrounded by quotes.  It
will still occur in most other places.

Fixes #200 / F82CF11F-BFD9-4512-A562-202B04B68051
2010-06-09 06:45:07 -04:00
John Wiegley
be6cef93c4 A further simplification of -V and -X
With -X COMM, all values are computed in terms of COMM, regardless.

With -V, only secondary commodities will ever be computed, never
primaries.  Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
2010-06-07 09:49:17 -04:00
John Wiegley
c85cf0d810 Fixed the way prices and costs are print'd 2010-06-07 08:32:14 -04:00