summaryrefslogtreecommitdiff
path: root/test/baseline/cmd-convert.test
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai.wohlfahrt@gmail.com>2020-06-09 22:12:13 +0100
committerMartin Michlmayr <tbm@cyrius.com>2021-01-31 09:59:02 +0800
commite791e4924f4bfb58044420ff5ab495f3ff5cf8c1 (patch)
tree98032476405868aad7d0986dabf13917c399af0b /test/baseline/cmd-convert.test
parentb155f8928c6a33af42f859b27c83639b72517f5e (diff)
downloadfork-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/cmd-convert.test')
-rw-r--r--test/baseline/cmd-convert.test20
1 files changed, 19 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