mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
;tests: ui: use --today to make hledger-ui tests robust (#1674)
This commit is contained in:
parent
8a4cea2a69
commit
02a79fb230
@ -2,15 +2,15 @@
|
||||
; So this test will break in a few months, unfortunately. Before then
|
||||
; we should add a --today=DATE option to help with testing.
|
||||
|
||||
2020-01-01 a past transaction
|
||||
2020-01-01 past transaction
|
||||
(a) 1
|
||||
|
||||
2021-12-31 a near future transaction
|
||||
2021-12-31 near future transaction
|
||||
(a) 2
|
||||
|
||||
~ monthly from 2021 to 2023 some near future periodic transactions
|
||||
~ monthly from 2021 to 2023 near future forecast transaction
|
||||
(a) 3
|
||||
|
||||
~ 9999-01-01 a far future periodic transaction (just one occurrence)
|
||||
~ 9999-01-01 far future forecast transaction
|
||||
(a) 4
|
||||
|
||||
|
@ -151,60 +151,59 @@ which has nice screenshots, but might be less up to date.
|
||||
2014-07-31 * .. .. 2550.60 USD, 4.62 VACHR ..GLD, 17.00 ITOT, 6 more..
|
||||
2014-08-03 * .. .. -2400.00 USD ..GLD, 17.00 ITOT, 6 more..
|
||||
|
||||
** hledger-ui -f forecast.journal --register a # future and forecasted txns are hidden by default
|
||||
** hledger-ui --today 2021-09-01 -f forecast.journal --register a # future and forecasted txns are hidden by default
|
||||
───────────────────────────── a transactions (1/1) ─────────────────────────────
|
||||
0000-01-01 a past transaction a 1 1
|
||||
0000-01-01 past transaction a 1 1
|
||||
|
||||
** hledger-ui -f forecast.journal --register a --forecast # with --forecast, future ordinary txns, and forecasted txns within the default forecast period, are shown
|
||||
** hledger-ui --today 2021-09-01 -f forecast.journal --register a --forecast # with --forecast, future ordinary txns, and forecasted txns within the default forecast period, are shown
|
||||
───────────────────────────── a transactions (1/4) ─────────────────────────────
|
||||
2020-01-01 a past transaction a 1 1
|
||||
2021-12-31 a near future transaction a 2 3
|
||||
2022-01-01 some near future periodic.. a 3 6
|
||||
2022-02-01 some near future periodic.. a 3 9
|
||||
2020-01-01 past transaction a 1 1
|
||||
2021-12-31 near future transaction a 2 3
|
||||
2022-01-01 near future forecast tran.. a 3 6
|
||||
2022-02-01 near future forecast tran.. a 3 9
|
||||
|
||||
** hledger-ui -f forecast.journal --register a --forecast=2021 # with an explicit forecast period, forecasted txns can overlap ordinary transactions
|
||||
──────────────────────────── a transactions (14/14) ────────────────────────────
|
||||
2020-01-01 a past transaction a 1 1
|
||||
2021-01-01 some near future periodic.. a 3 4
|
||||
2021-02-01 some near future periodic.. a 3 7
|
||||
2021-03-01 some near future periodic.. a 3 10
|
||||
2021-04-01 some near future periodic.. a 3 13
|
||||
2021-05-01 some near future periodic.. a 3 16
|
||||
2021-06-01 some near future periodic.. a 3 19
|
||||
2021-07-01 some near future periodic.. a 3 22
|
||||
2021-08-01 some near future periodic.. a 3 25
|
||||
2021-09-01 some near future periodic.. a 3 28
|
||||
2021-10-01 some near future periodic.. a 3 31
|
||||
2021-11-01 some near future periodic.. a 3 34
|
||||
2021-12-01 some near future periodic.. a 3 37
|
||||
2021-12-31 a near future transaction a 2 39
|
||||
|
||||
** press F at least three times # the future & forecasted txns are toggled every time (#1411)
|
||||
|
||||
** hledger-ui -f forecast.journal --register a --forecast 2021 # the = between --forecast and argument is mandatory
|
||||
** hledger-ui --today 2021-09-01 -f forecast.journal --register a --forecast 2021 # "=" is required between --forecast and its argument
|
||||
───────────────────── a transactions matching 2021 (100/0) ─────────────────────
|
||||
|
||||
** hledger-ui --today 2021-09-01 -f forecast.journal --register a --forecast=2021 # the forecast period can be specified, and this allows forecast txns to overlap ordinary transactions
|
||||
──────────────────────────── a transactions (14/14) ────────────────────────────
|
||||
2020-01-01 past transaction a 1 1
|
||||
2021-01-01 near future forecast tran.. a 3 4
|
||||
2021-02-01 near future forecast tran.. a 3 7
|
||||
2021-03-01 near future forecast tran.. a 3 10
|
||||
2021-04-01 near future forecast tran.. a 3 13
|
||||
2021-05-01 near future forecast tran.. a 3 16
|
||||
2021-06-01 near future forecast tran.. a 3 19
|
||||
2021-07-01 near future forecast tran.. a 3 22
|
||||
2021-08-01 near future forecast tran.. a 3 25
|
||||
2021-09-01 near future forecast tran.. a 3 28
|
||||
2021-10-01 near future forecast tran.. a 3 31
|
||||
2021-11-01 near future forecast tran.. a 3 34
|
||||
2021-12-01 near future forecast tran.. a 3 37
|
||||
2021-12-31 near future transaction a 2 39
|
||||
|
||||
** hledger-ui -f forecast.journal --register a --forecast=2021 --watch, press F once # future/forecasted txns are hidden
|
||||
** press F four times # the future & forecasted txns are toggled every time (#1411)
|
||||
|
||||
** hledger-ui --today 2021-09-01 -f forecast.journal --register a --forecast=2021 --watch, press F once # future/forecasted txns are hidden
|
||||
───────────────────────────── a transactions (1/1) ─────────────────────────────
|
||||
2020-01-01 a past transaction a 1 1
|
||||
2020-01-01 past transaction a 1 1
|
||||
|
||||
** with the above still running, touch forecast.journal, press F again # forecast txns reappear, even with file modified while hidden (#1204)
|
||||
───────────────────────────── a transactions (1/14) ────────────────────────────
|
||||
2020-01-01 a past transaction a 1 1 # <- selected
|
||||
2021-01-01 some near future periodic.. a 3 4
|
||||
2021-02-01 some near future periodic.. a 3 7
|
||||
2021-03-01 some near future periodic.. a 3 10
|
||||
2021-04-01 some near future periodic.. a 3 13
|
||||
2021-05-01 some near future periodic.. a 3 16
|
||||
2021-06-01 some near future periodic.. a 3 19
|
||||
2021-07-01 some near future periodic.. a 3 22
|
||||
2021-08-01 some near future periodic.. a 3 25
|
||||
2021-09-01 some near future periodic.. a 3 28
|
||||
2021-10-01 some near future periodic.. a 3 31
|
||||
2021-11-01 some near future periodic.. a 3 34
|
||||
2021-12-01 some near future periodic.. a 3 37
|
||||
2021-12-31 a near future transaction a 2 39
|
||||
2020-01-01 past transaction a 1 1 # <- selected
|
||||
2021-01-01 near future forecast tran.. a 3 4
|
||||
2021-02-01 near future forecast tran.. a 3 7
|
||||
2021-03-01 near future forecast tran.. a 3 10
|
||||
2021-04-01 near future forecast tran.. a 3 13
|
||||
2021-05-01 near future forecast tran.. a 3 16
|
||||
2021-06-01 near future forecast tran.. a 3 19
|
||||
2021-07-01 near future forecast tran.. a 3 22
|
||||
2021-08-01 near future forecast tran.. a 3 25
|
||||
2021-09-01 near future forecast tran.. a 3 28
|
||||
2021-10-01 near future forecast tran.. a 3 31
|
||||
2021-11-01 near future forecast tran.. a 3 34
|
||||
2021-12-01 near future forecast tran.. a 3 37
|
||||
2021-12-31 near future transaction a 2 39
|
||||
|
||||
** hledger-ui -f 1468.j, 2, RIGHT # in list mode, register of account above depth limit shows only its transactions
|
||||
───────────────────────────── a transactions (1/1) ─────────────────────────────
|
||||
|
Loading…
Reference in New Issue
Block a user