Commit graph

166 commits

Author SHA1 Message Date
Martin Michlmayr
fbcb5e9093 Fix period expression parsing for month to month without year
Bug fix for #1074, a regression introduced by the fix for bug #375
2014-10-02 17:31:26 -04:00
Johann Klähn
6323fe52b7 fix regression test
see pull request #320 / commit 4c86042665
2014-09-10 00:03:40 +02:00
Martin Michlmayr
a44572f3ec Add a regression test for bug #712 2014-07-14 20:44:48 -04:00
Martin Michlmayr
7241b1f62b Add regression tests for bug #713 2014-07-14 20:44:05 -04:00
Martin Michlmayr
ddfabe0692 Update tests for fix for bug #713
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.
2014-07-14 20:42:44 -04:00
Martin Michlmayr
e7ed889872 Add regression test for commit de17ccf1
Add regression test for commit de17ccf1 (" When a status flag (! or *) is
explicitly specified for an individual…")
2014-06-30 19:41:38 -04:00
Martin Michlmayr
23902686a3 Don't lose commodity when cost is not separated by whitespace
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
2014-06-05 19:46:22 -04:00
Martin Michlmayr
a5ffcc42ff Improve backwards compatibility with ledger2
This brings some single character format strings in line with what
they actually meant in ledger2.

Bug fix for #755
2014-05-30 23:52:36 -04:00
Martin Michlmayr
b534ee80a3 Handle POST_COST_VIRTUAL in print
Bug fix for #1046
2014-05-30 20:23:59 -04:00
Martin Michlmayr
fafd7c1346 Check whether a month is followed by a year
Bug fix for #375
2014-05-30 18:27:22 -04:00
Martin Michlmayr
c55f8c1ef1 Add test case to test for invalid option embedded in journal 2014-05-26 18:30:16 -04:00
Martin Michlmayr
642bdd1d99 Add test case for: option --permissive now quiets balance assertions
Add a test csae for the change "The option --permissive now quiets
balance assertions" (634aa589)
2014-05-18 09:55:04 -04:00
thdox
8b3f8d1884 Fix bug introduced by commit AA2FF2B
Correction is to not use uninitialized amount
2014-05-17 23:41:07 +02:00
Martin Michlmayr
ab921cca0c Ensure that high-levels directives have arguments if they need one
Ensure that high-levels directives, such as account, alias and
commodity, have arguments if they need one.  Bug fix for #1036
2014-05-14 17:55:07 -04:00
Martin Michlmayr
86fd99c9d0 Ensure that directives have arguments if they need one
Ensure that account, commodity and payee directives have arguments
if they need one.  Bug fix for #785
2014-05-14 17:53:43 -04:00
Martin Michlmayr
60d9c2bc1d Remove trailing whitespace from error messages
Fix for bug #867
2014-05-13 18:08:34 -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
John Wiegley
bd8a1a6756 Use the POST_COST_VIRTUAL flag when exchange commodities
Fixes #999
2014-05-08 14:28:07 -05: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
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
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
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
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
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
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
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
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
Johann Klähn
937c9c7bd1 ignore extra fields when converting csv files
This fixes bug #736.
2012-10-13 20:04:10 +02:00
Johann Klähn
1f2fe401f1 ignore (some) empty field when converting csv
This fixes bug #733 and bug #734.
2012-10-13 19:39:10 +02:00
Bradley M. Kuhn
bf7375db11 Rounding is different for balance totals vs. postings when using posting costs.
test/regress/CAE63F5C-b.test and test/regress/CAE63F5C-c.test should both
pass, but test/regress/CAE63F5C-c.test does not, because the total line of
$6.46 is rounded wrong; it should be $6.45.

There seems to be different rounding occurring for totals vs. postings.

This seems to be related to Bug #492.
2012-09-30 14:53:05 -04:00
Paolo Capriotti
e56a4ffef0 Running totals on a report including automated transactions are computed with extra precision,
resulting in balances differing from the sum of their components.
2012-09-30 14:46:51 -04:00
John Wiegley
afc023406a Always store absolute paths internally 2012-08-02 16:13:58 -05:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
ad7ace902c Allow --invert to work with --monthly
Fixes #770
2012-04-06 01:32:38 -05:00
John Wiegley
931d6ff3f4 Fix to Python value() method handling 2012-03-30 00:51:06 -05:00
John Wiegley
bf66abc258 Added another Python support regression test 2012-03-30 00:51:06 -05:00
John Wiegley
413a392aa9 Added the first Python support regression test 2012-03-30 00:51:06 -05:00
John Wiegley
8e8c2904f5 Never price commodities using annotated commodities 2012-03-30 00:51:05 -05:00
Martin Michlmayr
3a159a1344 Add a regression test 2012-03-29 22:56:56 +01:00