mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 04:13:11 +03:00
tests: csv: fix confusingly wrong numbering
This commit is contained in:
parent
f633f2bbb1
commit
a104aee3a0
@ -25,7 +25,7 @@
|
||||
>>>2 /using conversion rules file.*[0-9]+\.rules/
|
||||
>>>=0
|
||||
|
||||
# 3. report rules parse error
|
||||
# report rules parse error
|
||||
# rm -rf t.rules$$; printf 'date-fiel 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\namount-field 2\ncurrency $\nbase-account assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50' | hledger convert --rules-file t.rules$$; rm -rf t.rules$$
|
||||
# >>>
|
||||
# 2009/09/10 Flubber Co
|
||||
@ -35,7 +35,7 @@
|
||||
# >>>2 /using conversion rules file.*t.rules/
|
||||
# >>>=0
|
||||
|
||||
# 4. handle conditions assigning multiple fields
|
||||
# 3. handle conditions assigning multiple fields
|
||||
rm -rf t.rules$$; printf 'fields date, description, amount\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\nif Flubber\n account2 acct\n comment cmt' >t.rules$$; echo '10/2009/09,Flubber Co,50' | hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||
>>>
|
||||
2009/09/10 Flubber Co ; cmt
|
||||
@ -45,7 +45,7 @@
|
||||
>>>2 /using conversion rules file.*t.rules/
|
||||
>>>=0
|
||||
|
||||
# 5. this should infer display styles correctly
|
||||
# this should infer display styles correctly
|
||||
# XXX but doesn't: (#415)
|
||||
# Got stdout:
|
||||
# $-1001.00 income:unknown
|
||||
@ -58,7 +58,8 @@
|
||||
# $-1,001.00 income:unknown
|
||||
# $1,001.00 unknown
|
||||
#>>>=0
|
||||
# 6. read CSV with balance field
|
||||
|
||||
# 4. read CSV with balance field
|
||||
rm -rf t.rules$$; printf 'fields date, description, amount, balance\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50,123' | hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||
>>>
|
||||
2009/09/10 Flubber Co
|
||||
@ -67,7 +68,8 @@
|
||||
|
||||
>>>2 /using conversion rules file.*t.rules/
|
||||
>>>=0
|
||||
# 7. read CSV with blank balance field
|
||||
|
||||
# 5. read CSV with blank balance field
|
||||
rm -rf t.rules$$; printf 'fields date, description, amount, balance\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50,123\n11/2009/09,Blubber Co,60,' | hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||
>>>
|
||||
2009/09/10 Flubber Co
|
||||
@ -80,7 +82,8 @@
|
||||
|
||||
>>>2 /using conversion rules file.*t.rules/
|
||||
>>>=0
|
||||
# 8. read CSV with empty balance field
|
||||
|
||||
# 6. read CSV with empty balance field
|
||||
rm -rf t.rules$$; printf 'fields date, description, amount, balance\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50,123\n11/2009/09,Blubber Co,60, ' | hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||
>>>
|
||||
2009/09/10 Flubber Co
|
||||
@ -93,7 +96,8 @@
|
||||
|
||||
>>>2 /using conversion rules file.*t.rules/
|
||||
>>>=0
|
||||
# 9. read CSV with rule double-negating column
|
||||
|
||||
# 7. read CSV with rule double-negating column
|
||||
rm -rf t.rules$$; printf 'skip 1\n\ncurrency $\n\nfields date, payee, payment\n\namount -%%payment\naccount1 liabilities:bank\naccount2 expense:other' >t.rules$$; echo 'date,payee,amount\n2009/10/9,Flubber Co,50\n2009/11/09,Merchant Credit,-60' | hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||
>>>
|
||||
2009/10/09
|
||||
|
Loading…
Reference in New Issue
Block a user