Commit graph

413 commits

Author SHA1 Message Date
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
ea249423d4 allow -f /dev/stdin in test runner 2013-01-17 12:08:20 +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
d922f46595 fix bug 748: option aliases not recognized 2013-01-15 23:30:17 +01: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
Johann Klähn
a633bc7fce add unit tests for amount_t→floor/ceil 2013-01-15 21:17:11 +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
John Wiegley
de729114d1 Merge pull request #92 from kljohann/bugs.bucket
fix bucket directive (bug 765)
2012-10-25 12:50:30 -07: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
9a2f440496 provide immediate feedback in test runner 2012-10-22 10:11:56 +02:00
Johann Klähn
08033e6d50 fix test runner if filename is specified
If the command line switch "-f" is used the test runner will
not pass the file name of the test file to ledger.
The line "test -f /dev/null" as used in test/baseline/cmd-convert.test
did not work as intended before this.
Also using "-f - " did not work as "$ledger" was noti
prepended to the command.
2012-10-18 13:45:40 -07:00
Johann Klähn
49b02614a3 fix account mapping in csv conversion
By using payees_for_unknown_accounts instead of account_mappings in
csv.cc ledger will have the same behaviour as in `ledger -f - print`
in that it uses payee fields in account directives to rewrite the
account.
2012-10-18 13:45:40 -07: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
27d9d770d3 update baseline test for convert command 2012-10-13 19:47:29 +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
627574492e Enable the baseline and manual tests 2012-05-20 05:01:17 -05:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
3c3bda19d6 Fixed a test that was unknowingly time-based 2012-05-18 01:08:44 -06:00
John Wiegley
a910549ca9 Fixes so that tests can run under distcheck 2012-04-25 03:09:56 -05:00
John Wiegley
ee641f353c Resolve some issues with proof builds 2012-04-15 01:17:01 -05:00
John Wiegley
ad7ace902c Allow --invert to work with --monthly
Fixes #770
2012-04-06 01:32:38 -05:00
John Wiegley
1809e63fb0 Added a test harness error diagnostic 2012-03-30 04:49:45 -05:00
John Wiegley
5c57eff64a Simplify feat-option_py.test 2012-03-30 04:49:19 -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
John Wiegley
ef7cab0830 Removed the cmd-emacs baseline test
The time issue causes too many false positives.
2012-03-29 03:55:48 -05:00
Martin Michlmayr
362fad5925 Add more tests 2012-03-27 20:16:17 +01:00
Martin Michlmayr
f3e320c98a Fix some tests not to be time-sensitive 2012-03-27 20:15:42 +01:00
Martin Michlmayr
86d5858444 Add more baseline tests. 2012-03-25 20:26:18 +01:00
Martin Michlmayr
4d0daf77d7 Add more baseline tests 2012-03-25 17:39:49 +01:00
Martin Michlmayr
d9baad45fa Add more baseline tests 2012-03-25 14:54:50 +01:00
Martin Michlmayr
8962d9c904 Add more baseline tests 2012-03-25 14:11:59 +01:00
Martin Michlmayr
3a61769098 Improve baseline/cmd-payees.test 2012-03-25 11:38:26 +01:00
John Wiegley
4b05759962 Fixed sorting of equity output 2012-03-23 16:46:11 -05:00
John Wiegley
38813bc635 Fixed output order in opt-equity.test 2012-03-23 15:55:50 -05:00
Martin Michlmayr
db20ad8f29 Add more baseline tests 2012-03-23 09:54:18 +00:00
Martin Michlmayr
902d09fd16 Add test case for bug #379 2012-03-23 09:32:39 +00:00
John Wiegley
c4db812173 Fixed cmd-emacs.test 2012-03-23 04:04:37 -05:00
John Wiegley
b5664ce2ef Allow use of $FILE in stdout checks 2012-03-23 04:02:01 -05:00
Martin Michlmayr
5cffbf16e9 Add more baseline tests 2012-03-23 08:58:33 +00:00