Commit Graph

393 Commits

Author SHA1 Message Date
Joseph Weston
5077443a84 lib: add tests and code for nonexistant files and malformed globs 2018-07-26 06:12:31 +01:00
Joseph Weston
c6c412632b lib: add failing functional test for glob pattern includes 2018-07-26 06:12:31 +01:00
Gaith Hallak
bf67823279 Add a test 2018-07-04 17:54:15 +03:00
Simon Michael
6924e8390c lib: journal: let alias/apply account affect account directives (#825) 2018-06-27 11:33:12 +01:00
Simon Michael
34b4553344 lib: test descriptions 2018-06-12 16:41:36 -07:00
Simon Michael
0edcd2f64e lib: test periodic transaction description, status mark, comment, tag
[ci skip]
2018-06-12 16:41:36 -07:00
Simon Michael
3146b9c910 lib: journal: update periodic txn func tests 2018-06-12 16:41:36 -07:00
Alex Chen
0d7380933b lib: update a parse-error test 2018-06-11 14:43:19 -06:00
Alex Chen
39e7ef0311 lib: refine date parser error messages 2018-06-11 13:58:55 -06:00
Simon Michael
1624206b5d lib: more parse error test cleanup (#804)
[ci skip]
2018-06-10 08:04:45 -07:00
Simon Michael
e83d9a1e34 lib: test cleanups (#804) 2018-06-10 07:54:47 -07:00
Simon Michael
9d33342ff3 lib: start some parse error tests (#804)
[ci skip]
2018-06-10 07:54:40 -07:00
Alex Chen
93fbac99d3 lib: refactor date parser 2018-05-24 09:35:27 -07:00
Alex Chen
676ea912b3 lib: fix issue where spaces were allowed as decimal points
- Fixes #749
- Also enabling the tests prepared for #749
2018-05-20 20:17:57 -07:00
awjchen
46aae19a54
lib: fix parsing of amounts with a whitespace digits separator 2018-05-20 16:02:59 -06:00
Simon Michael
d897bacdfe journal: more failing tests for spaced amounts (#749)
[ci skip]
2018-05-17 16:17:06 -07:00
Simon Michael
1c6702d598 budget: note some todos
[ci skip]
2018-05-17 08:12:14 -07:00
Simon Michael
5e725ff36e journal: add tests for #749, commented 2018-05-17 07:51:47 -07:00
Simon Michael
5516622472 journal: consolidate amount/commodity func tests 2018-05-17 06:57:27 -07:00
Simon Michael
3bf0f19bb5 budget: another func test against my confusion 2018-05-16 17:23:15 -07:00
Simon Michael
999080af89 fix budget func test 2018-05-16 12:55:06 -07:00
Simon Michael
330c58d2b4 budget: extra func test for something I get confused about with aliases 2018-05-16 11:25:30 -07:00
Simon Michael
9151f5004e budget: show a budget report even with no interval (for whole journal period) 2018-04-24 23:12:42 -07:00
Simon Michael
568a442307 budget: tweak hiding/grouping of unbudgeted accounts
It now works slightly differently. Eg:

- <unbudgeted>'s subaccounts are hidden by default
- --show-unbudgeted shows all unbudgeted accounts, including subaccounts of budgeted parents
- --show-unbudgeted doesn't affect the grouping under <unbudgeted>

IMHO it's a nice simplification and increase in consistency, while still meeting the original intent.
2018-04-24 13:42:12 -07:00
Simon Michael
8759f12b63 budget: more consistent display of percentage 2018-04-23 18:52:28 -07:00
Simon Michael
0c140d7238 budget: allow multi-interval budgets again
Budgets were restricted to a single interval in 1.9, but this was
a mistake. This restores the 1.5 behaviour, where a budget can be built
up from multiple periodic transactions with different intervals.
2018-04-23 18:52:28 -07:00
Simon Michael
43287a3e26 budget: use a new first-class BudgetReport for --budget 2018-04-23 18:52:28 -07:00
Simon Michael
0b380971f7 journal: require a decimal point in commodity/format/D directives
A commodity directive that doesn't specify the decimal point character
increases ambiguity and the chance of misparsing numbers, especially
as it overrides all style information inferred from the journal amounts.
In some cases it caused amounts with a decimal point to be parsed as if
with a digit group separator so 1.234 became 1234.

We could augment it with extra info from the journal amounts, when available,
but it would still be possible to be ambiguous, and that won't be obvious.

A commodity directive is what we recommend to nail down the style.
It seems the simple and really only way to do this reliably is to require
an explicit decimal point character. Most folks probably do this already.

Unfortunately, it makes another potential incompatiblity with ledger and
beancount journals. But the error message will be clear and easy to
work around.
2018-04-20 21:56:06 -07:00
Simon Michael
3f2827424c refactor: number parsing docs 2018-04-20 21:39:06 -07:00
Simon Michael
3d4f5600ae journal: infer and balance amounts with standard amount styles (fix #737)
Inferred amounts now have the appropriate standard amount style applied.
And when checking for balanced transactions, amount styles declared with
commodity directives are also used (previously only inferred amount styles were).
2018-04-20 13:40:05 -07:00
Dmitry Astapov
0c835acd18 lib, app: better descriptions for forecast transactions 2018-04-18 16:05:08 -07:00
Dmitry Astapov
d82370d10b lib, app, web: remove differences between command line and journal file aliases 2018-04-17 16:09:11 -07:00
Dmitry Astapov
93814652f8 lib: auto postings are generated right after posting that triggered them (#729) 2018-04-17 14:33:32 -07:00
Simon Michael
a5d70debbb cli: disable failing test (#727) 2018-04-08 18:38:54 -07:00
Simon Michael
cc1db7be98 bal: failing test for account code sorting (#727)
[ci skip]
2018-04-06 05:42:00 -07:00
Simon Michael
4822b53f69 scientific notation test notes (#704, #706) 2018-03-31 02:42:37 +01:00
Simon Michael
c95982381b remove test unrelated to scientific notation (#704, #706) 2018-03-31 01:50:06 +01:00
Mykola Orliuk
b377bff90a lib: support scientific number notation (#704, #706)
closes simonmichael/hledger#704
2018-03-31 01:49:46 +01:00
Simon Michael
2a87ea56ff budget: refactor; show budget goals even with no or zero actual
This makes budget reports more intuitive. It is a temporary hack which
can misorder columns in some cases (if actual and budget activity
occur in a different range of columns). We should redo this in a more
principled way.
2018-03-30 03:26:32 +01:00
Simon Michael
fc3a71bc46 budget: more tests 2018-03-29 16:36:31 +01:00
Simon Michael
38289686b7 budget: convert tests to format 3 2018-03-29 15:56:09 +01:00
Simon Michael
6f8714cdbd update budget func. tests 2018-03-29 15:49:31 +01:00
Simon Michael
10a4392b24 update functional tests for new monthly headings 2018-03-29 14:54:36 +01:00
Simon Michael
fb5c0dba22 bin: delete hledger-budget func. tests 2018-03-21 12:36:26 +00:00
Simon Michael
7550a1dcb8 convert register tests to new format, test stderr, reveal travis issue 2018-02-16 01:22:08 -08:00
Simon Michael
e491f513a1 cli: tabular reports no longer have a trailing blank line added
Tabular reports from bal, bs etc. have until now been rendered on
the terminal with one final blank line, for readability.
This change drops the blank line.

This is consistent with the non-tabular balance and register output
(not print, which is a special case), and with most unix commands.
The real reason for it, which I admit is flimsy, is that I can now omit
the final delimiter (>=0) when using shelltestrunner 1.9's new format,
making functional tests easier to maintain and more readable.
If there's opposition, this could be reverted.
2018-01-23 12:47:56 -08:00
Simon Michael
e43c430a61 bal: clarify some todo tests, use shelltestrunner's format 3 2018-01-23 12:17:14 -08:00
Simon Michael
6c60e4a97b bs/cf/is: always show a tabular report, even with no report interval
Previously, if you specified no report interval, the text output of
these commands was a simple report like the original balance command,
with amounts on the left and account names on the right. Also,
balances used arithmetic sign like the balance command.
Now it always draws a table, with account names in the left
column, and shows balances with normal-positive sign, consistent with
the multicolumn reports. Less code, fewer bugs.
2018-01-23 11:05:01 -08:00
Simon Michael
c4b778bfb9 update report titles in func. tests 2018-01-22 07:58:01 -08:00
Simon Michael
6b349e3123 bs/bse/cf/is: show all balances as normally-positive (experimental)
Income, liability and equity balances, which until now we have
always displayed as negative numbers, are now shown as normally positive
by these reports.
Negative numbers now indicate a contra-balance (eg an overdrawn
checking account), a net loss, a negative net worth, etc.
This makes these reports more like conventional financial statements,
and easier to read and share with normal people.
2018-01-18 11:01:07 -08:00