summaryrefslogtreecommitdiff
path: root/test/baseline
diff options
context:
space:
mode:
Diffstat (limited to 'test/baseline')
-rw-r--r--test/baseline/cmd-convert.test4
-rw-r--r--test/baseline/feat-convert-with-diretives.dat3
-rw-r--r--test/baseline/feat-convert-with-diretives.test28
-rw-r--r--test/baseline/opt-aux-date.test2
-rw-r--r--test/baseline/opt-file.test2
5 files changed, 35 insertions, 4 deletions
diff --git a/test/baseline/cmd-convert.test b/test/baseline/cmd-convert.test
index d3fbeae5..d444da52 100644
--- a/test/baseline/cmd-convert.test
+++ b/test/baseline/cmd-convert.test
@@ -17,7 +17,7 @@ end test
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert3.dat -> 1
__ERROR__
-While parsing file "test/baseline/cmd-convert3.dat", line 1:
+While parsing file "$sourcepath/test/baseline/cmd-convert3.dat", line 1:
While parsing CSV line:
01/01/2011,,
@@ -26,7 +26,7 @@ end test
test -f /dev/null convert test/baseline/cmd-convert4.dat -> 1
__ERROR__
-While parsing file "test/baseline/cmd-convert4.dat", line 1:
+While parsing file "$sourcepath/test/baseline/cmd-convert4.dat", line 1:
While parsing CSV line:
bogus,$10,
diff --git a/test/baseline/feat-convert-with-diretives.dat b/test/baseline/feat-convert-with-diretives.dat
new file mode 100644
index 00000000..ac13ff81
--- /dev/null
+++ b/test/baseline/feat-convert-with-diretives.dat
@@ -0,0 +1,3 @@
+date,payee,amount
+2012/01/01,KFC,$10
+2012/01/02,"REWE SAGT DANKE 123454321",10€
diff --git a/test/baseline/feat-convert-with-diretives.test b/test/baseline/feat-convert-with-diretives.test
new file mode 100644
index 00000000..2f6e0102
--- /dev/null
+++ b/test/baseline/feat-convert-with-diretives.test
@@ -0,0 +1,28 @@
+account Expenses:Food
+ payee KFC
+ payee REWE
+
+payee REWE
+ alias REWE SAGT DANKE
+
+# When reading csv file without directives:
+test -f /dev/null convert test/baseline/feat-convert-with-diretives.dat
+2012/01/01 * KFC
+ Expenses:Unknown $10
+ Equity:Unknown
+
+2012/01/02 * REWE SAGT DANKE 123454321
+ Expenses:Unknown 10€
+ Equity:Unknown
+end test
+
+# When reading csv file with directives:
+test --account "Assets:Cash" convert test/baseline/feat-convert-with-diretives.dat
+2012/01/01 * KFC
+ Expenses:Food $10
+ Assets:Cash
+
+2012/01/02 * REWE
+ Expenses:Food 10€
+ Assets:Cash
+end test
diff --git a/test/baseline/opt-aux-date.test b/test/baseline/opt-aux-date.test
index 9d1e73d0..495bb7e6 100644
--- a/test/baseline/opt-aux-date.test
+++ b/test/baseline/opt-aux-date.test
@@ -10,7 +10,7 @@
Expenses:Books $20.00
Assets:Cash
-test reg --effective
+test reg --aux-date
08-Jan-01 January Expenses:Books $10.00 $10.00
Assets:Cash $-10.00 0
08-Feb-01 End of January Expenses:Books $10.00 $10.00
diff --git a/test/baseline/opt-file.test b/test/baseline/opt-file.test
index e01d929d..66d0ab1b 100644
--- a/test/baseline/opt-file.test
+++ b/test/baseline/opt-file.test
@@ -1,6 +1,6 @@
test -f opt-file-does-not-exist.dat bal -> 1
__ERROR__
-Error: Cannot read journal file "opt-file-does-not-exist.dat"
+Error: Cannot read journal file "$sourcepath/opt-file-does-not-exist.dat"
end test
test -f test/baseline/opt-file1.dat -f test/baseline/opt-file2.dat bal