Commit Graph

404 Commits

Author SHA1 Message Date
Simon Michael
9076474a09 lib: --forecast func tests note 2018-08-17 09:37:55 +01:00
Simon Michael
1d775a7a9c lib: D should not affect automated posting multiplier amounts (fix #860) 2018-08-17 07:39:17 +01:00
Simon Michael
13436637c6 lib: "decimal point" -> "decimal separator" in error message 2018-08-17 07:37:26 +01:00
Simon Michael
e05188831e tests: simplify unittests func. test 2018-08-16 06:05:07 +01:00
Simon Michael
c79cb568f0 journal: fix include test with shelltest -w 2018-08-15 23:05:37 +01:00
Simon Michael
717a24a76d fix unit tests func test 2018-08-15 12:03:13 +01:00
Simon Michael
f47a617dcc journal: commented test for D and auto postings (#860)
[ci skip]
2018-08-15 10:32:10 +01:00
Simon Michael
e10ab0f7f7 tools: make functest: also run unit tests
The main unit tests are now included in the functional test suite
(via hledger's test command), so make functest covers more.

[ci skip]
2018-08-03 15:16:59 +01:00
Simon Michael
d685d1aa9b lib,rewrite: simplify transactionModifierToFunction
This removes transactionModifierToFunction's extra query parameter;
the rewrite command sets it in the TransactionModifier instead, which
I think is equivalent. I had to change one functional test, but it
seems correct now, so perhaps it wasn't working right before ?
2018-08-02 08:25:49 +01:00
Joseph Weston
e8c362e3e5 lib: modify testcase to test for lexicographic inclusion order 2018-07-26 06:12:31 +01:00
Joseph Weston
c472bb6ff3 lib: remove correct files at test end, and do not remove recursively
We are not removing directories, so no need for the '-r' flag to rm.
2018-07-26 06:12:31 +01:00
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