mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 12:54:07 +03:00
convert register tests to new format, test stderr, reveal travis issue
This commit is contained in:
parent
2f87657185
commit
7550a1dcb8
@ -1,74 +1,58 @@
|
||||
# 1. monthly reporting interval, no end dates, shows just the intervals with data:
|
||||
hledger -f- register --period 'monthly'
|
||||
<<<
|
||||
<
|
||||
2011/2/1
|
||||
(a) 1
|
||||
>>>
|
||||
|
||||
$ hledger -f- register --period 'monthly'
|
||||
2011/02 a 1 1
|
||||
>>>=0
|
||||
|
||||
# 2. or with a query pattern, just the intervals with matched data:
|
||||
hledger -f- register --period 'monthly' b
|
||||
<<<
|
||||
<
|
||||
2011/1/1
|
||||
(a) 1
|
||||
|
||||
2011/2/1
|
||||
(b) 1
|
||||
>>>
|
||||
|
||||
$ hledger -f- register --period 'monthly' b
|
||||
2011/02 b 1 1
|
||||
>>>=0
|
||||
|
||||
<
|
||||
2011/1/1
|
||||
(a) 1
|
||||
|
||||
2011/2/1
|
||||
(b) 1
|
||||
|
||||
2011/3/1
|
||||
(c) 1
|
||||
|
||||
# 3. with --empty, show all intervals spanned by the journal
|
||||
# (unlike current ledger, but more useful)
|
||||
hledger -f- register --period 'monthly' b --empty
|
||||
<<<
|
||||
2011/1/1
|
||||
(a) 1
|
||||
|
||||
2011/2/1
|
||||
(b) 1
|
||||
|
||||
2011/3/1
|
||||
(c) 1
|
||||
>>>
|
||||
$ hledger -f- register --period 'monthly' b --empty
|
||||
2011/01 0 0
|
||||
2011/02 b 1 1
|
||||
2011/03 0 1
|
||||
>>>=0
|
||||
|
||||
# 4. any specified begin/end dates limit the intervals reported
|
||||
hledger -f- register --period 'monthly to 2011/3/1' b --empty
|
||||
<<<
|
||||
2011/1/1
|
||||
(a) 1
|
||||
|
||||
2011/2/1
|
||||
(b) 1
|
||||
|
||||
2011/3/1
|
||||
(c) 1
|
||||
>>>
|
||||
$ hledger -f- register --period 'monthly to 2011/3/1' b --empty
|
||||
2011/01 0 0
|
||||
2011/02 b 1 1
|
||||
>>>=0
|
||||
|
||||
# 5. --date2 should work with intervals
|
||||
hledger -f- register --monthly --date2
|
||||
<<<
|
||||
<
|
||||
2014/1/1
|
||||
(a) 1
|
||||
|
||||
2014/2/1=2014/1/31
|
||||
(b) 1
|
||||
>>>
|
||||
|
||||
$ hledger -f- register --monthly --date2
|
||||
2014/01 a 1 1
|
||||
b 1 2
|
||||
>>>=0
|
||||
|
||||
# 6. All matched postings in the displayed intervals should be reported on.
|
||||
hledger -f- register -p 'monthly 2014/1/10-2014/2/20'
|
||||
<<<
|
||||
<
|
||||
2014/1/5
|
||||
(before) 1
|
||||
|
||||
@ -78,8 +62,8 @@ hledger -f- register -p 'monthly 2014/1/10-2014/2/20'
|
||||
2014/2/25
|
||||
(after) 1
|
||||
|
||||
>>>
|
||||
$ hledger -f- register -p 'monthly 2014/1/10-2014/2/20'
|
||||
2014/01 before 1 1
|
||||
2014/02 after 1 2
|
||||
within 1 3
|
||||
>>>=0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user