mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-27 12:24:43 +03:00
test: tests for multi-posting CSV import
This commit is contained in:
parent
6b5026c240
commit
a07a084fb7
@ -111,6 +111,25 @@ $ printf 'fields date, description, amount, balance1, balance2\ndate-format %%d
|
||||
>=0
|
||||
|
||||
|
||||
# 11. More than two postings
|
||||
$ printf 'fields date, description, amount, balance1, balance2, amount3,comment3\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\naccount3 expenses:tax\n' >t.$$.csv.rules; printf '10/2009/09,Flubber Co,50,321,123,0.234,VAT\n' | hledger -f csv:- --rules-file t.$$.csv.rules print && rm -rf t.$$.csv.rules
|
||||
2009/09/10 Flubber Co
|
||||
assets:myacct $50 = $321
|
||||
expense:unknown = $123
|
||||
expenses:tax $0.234 ; VAT
|
||||
|
||||
>=0
|
||||
|
||||
# 12. More than two postings and different currencies
|
||||
$ printf 'fields date, description, amount, balance1, balance2, currency3, amount3,comment3\ndate-format %%d/%%Y/%%m\ncurrency $\naccount1 assets:myacct\naccount3 expenses:tax\n' >t.$$.csv.rules; printf '10/2009/09,Flubber Co,50,321,123,£,0.234,VAT\n' | hledger -f csv:- --rules-file t.$$.csv.rules print && rm -rf t.$$.csv.rules
|
||||
2009/09/10 Flubber Co
|
||||
assets:myacct $50 = $321
|
||||
expense:unknown = $123
|
||||
expenses:tax £0.234 ; VAT
|
||||
|
||||
>=0
|
||||
|
||||
|
||||
# . TODO: without --separator gives obscure error
|
||||
# |
|
||||
# 1 | 10/2009/09;Flubber Co🎅;50;
|
||||
|
Loading…
Reference in New Issue
Block a user