From c582b45bf65e3d993a0c5c75bb923181256835b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trygve=20Laugst=C3=B8l?= Date: Fri, 3 Jun 2011 17:40:49 +0000 Subject: [PATCH] Adding test for the convert command's in and out fields. --- tests/convert-with-in-and-out-fields.test | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/convert-with-in-and-out-fields.test diff --git a/tests/convert-with-in-and-out-fields.test b/tests/convert-with-in-and-out-fields.test new file mode 100644 index 000000000..d477d69b1 --- /dev/null +++ b/tests/convert-with-in-and-out-fields.test @@ -0,0 +1,17 @@ +# Conversion from CSV to Ledger with in-field and out-field +printf 'base-account Assets:MyAccount\ndate-field 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\nin-field 2\nout-field 3\ncurrency $\n' >convert.rules ; touch unused.journal ; bin/hledger -f unused.journal convert --rules convert.rules - ; rm -rf unused.journal convert.rules +<<< +10/2009/09,Flubber Co,50, +11/2009/09,Flubber Co,,50 +>>> +2009/09/11 Flubber Co + expenses:unknown $50 + Assets:MyAccount $-50 + +2009/09/10 Flubber Co + income:unknown $-50 + Assets:MyAccount $50 + +>>>2 +using conversion rules file convert.rules +>>>=0