mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-14 02:14:14 +03:00
21d9945ba9
Using "hledgerdev" was a hack to help ensure that tests used a fresh developer build by default. Now they specify "hledger" again, which fits better with stack. It's up to the tester to make sure the desired executable is first in PATH or specified with -w. (Note a couple of tests currently don't obey -w and will always run "hledger", see addons.test).
71 lines
1.4 KiB
Plaintext
71 lines
1.4 KiB
Plaintext
# 1.
|
|
hledger -f - register --date2
|
|
<<<
|
|
2009/1/1=2010/1/1 x
|
|
a 1
|
|
b
|
|
>>>
|
|
2010/01/01 x a 1 1
|
|
b -1 0
|
|
>>>=0
|
|
|
|
# 2. -b/-e/-p match the secondary date if --date2 is present (also, the secondary date is displayed)
|
|
hledger -f- register -p 2014/1/2 --date2
|
|
<<<
|
|
2014/1/1=1/2
|
|
(a) 1
|
|
|
|
2014/1/3
|
|
(b) 1
|
|
>>>
|
|
2014/01/02 (a) 1 1
|
|
>>>=0
|
|
|
|
# 3. date: matches the secondary date if --date2 is present (on the command line, at least)
|
|
hledger -f- register date:2014/1/2 --date2
|
|
<<<
|
|
2014/1/1=1/2
|
|
(a) 1
|
|
|
|
2014/1/3
|
|
(b) 1
|
|
>>>
|
|
2014/01/02 (a) 1 1
|
|
>>>=0
|
|
|
|
# 4. date2: matches the secondary date
|
|
hledger -f- register date2:2014/1/2
|
|
<<<
|
|
2014/1/1=1/2
|
|
(a) 1
|
|
|
|
2014/1/3
|
|
(b) 1
|
|
>>>
|
|
2014/01/01 (a) 1 1
|
|
>>>=0
|
|
|
|
# 5. you need to add --date2 if you also want the secondary date displayed
|
|
hledger -f- register date2:2014/1/2 --date2
|
|
<<<
|
|
2014/1/1=1/2
|
|
(a) 1
|
|
|
|
2014/1/3
|
|
(b) 1
|
|
>>>
|
|
2014/01/02 (a) 1 1
|
|
>>>=0
|
|
|
|
# 3. date2: matching is not affected by --date2
|
|
hledger -f- register date2:2014/1/1 --date2
|
|
<<<
|
|
2014/1/1=1/2
|
|
(a) 1
|
|
|
|
2014/1/3
|
|
(b) 1
|
|
>>>
|
|
>>>=0
|
|
|