diff options
author | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-06-09 22:12:13 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2021-01-31 09:59:02 +0800 |
commit | e791e4924f4bfb58044420ff5ab495f3ff5cf8c1 (patch) | |
tree | 98032476405868aad7d0986dabf13917c399af0b /test/baseline | |
parent | b155f8928c6a33af42f859b27c83639b72517f5e (diff) | |
download | fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.tar.gz fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.tar.bz2 fork-ledger-e791e4924f4bfb58044420ff5ab495f3ff5cf8c1.zip |
Add debit field to convert command
This changes the error reported when a transaction with no amount is
imported.
Diffstat (limited to 'test/baseline')
-rw-r--r-- | test/baseline/cmd-convert.test | 20 | ||||
-rw-r--r-- | test/baseline/cmd-convert5.dat | 3 | ||||
-rw-r--r-- | test/baseline/cmd-convert6.dat | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/test/baseline/cmd-convert.test b/test/baseline/cmd-convert.test index 8ee5bb2e..e59b727d 100644 --- a/test/baseline/cmd-convert.test +++ b/test/baseline/cmd-convert.test @@ -21,7 +21,7 @@ While parsing file "$sourcepath/test/baseline/cmd-convert3.dat", line 1: While parsing CSV line: 01/01/2011,, -Error: No quantity specified for amount +Error: Only one posting with null amount allowed per transaction end test test -f /dev/null convert test/baseline/cmd-convert4.dat -> 1 @@ -33,3 +33,21 @@ While parsing CSV line: Error: Invalid date: bogus end test +test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert5.dat +2011/01/01 * test1 + Expenses:Unknown 20.00 EUR + Equity:Unknown + +2011/01/02 * test2 + Expenses:Unknown -10.00 EUR + Equity:Unknown +end test + +test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert6.dat -> 1 +__ERROR__ +While parsing file "$sourcepath/test/baseline/cmd-convert6.dat", line 1: +While parsing CSV line: + 01/01/2011,20.00 EUR,10.00 EUR,test1, + +Error: Cannot have two values for a single transaction +end test diff --git a/test/baseline/cmd-convert5.dat b/test/baseline/cmd-convert5.dat new file mode 100644 index 00000000..f9c683a1 --- /dev/null +++ b/test/baseline/cmd-convert5.dat @@ -0,0 +1,3 @@ +date,credit,debit,desc, +01/01/2011,20.00 EUR,,test1, +01/02/2011,,10.00 EUR,test2,
\ No newline at end of file diff --git a/test/baseline/cmd-convert6.dat b/test/baseline/cmd-convert6.dat new file mode 100644 index 00000000..d778d555 --- /dev/null +++ b/test/baseline/cmd-convert6.dat @@ -0,0 +1,2 @@ +date,credit,debit,desc, +01/01/2011,20.00 EUR,10.00 EUR,test1,
\ No newline at end of file |