summaryrefslogtreecommitdiff
path: root/test/baseline
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2013-04-29 16:36:29 -0500
committerJohn Wiegley <johnw@newartisans.com>2013-04-29 16:36:29 -0500
commit59550b7f66c31592160749c5177074f63d19fa9d (patch)
tree0b28be9ab403e67d042f74ae9d1d76d885486b18 /test/baseline
parent385cbd25b9905b16a4c7723bb4e5a5813e84aab0 (diff)
parent6bef247759acbdc026624e78d0fd78297bc79501 (diff)
downloadfork-ledger-59550b7f66c31592160749c5177074f63d19fa9d.tar.gz
fork-ledger-59550b7f66c31592160749c5177074f63d19fa9d.tar.bz2
fork-ledger-59550b7f66c31592160749c5177074f63d19fa9d.zip
Merge branch 'next'
Diffstat (limited to 'test/baseline')
-rw-r--r--test/baseline/cmd-accounts.test6
-rw-r--r--test/baseline/cmd-commodities.test4
-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-count.test6
-rw-r--r--test/baseline/opt-file.test2
8 files changed, 43 insertions, 12 deletions
diff --git a/test/baseline/cmd-accounts.test b/test/baseline/cmd-accounts.test
index be6365fd..2f0310da 100644
--- a/test/baseline/cmd-accounts.test
+++ b/test/baseline/cmd-accounts.test
@@ -15,12 +15,12 @@
Assets:Testing123ÕßDone
test accounts
+Assets:AAA
Assets:Bank
-Equity:Opening balance
+Assets:Testing123ÕßDone
Assets:XXX
-Assets:AAA
Assets:♚
-Assets:Testing123ÕßDone
+Equity:Opening balance
end test
test accounts assets:a
diff --git a/test/baseline/cmd-commodities.test b/test/baseline/cmd-commodities.test
index 0ce6f7a0..719b6798 100644
--- a/test/baseline/cmd-commodities.test
+++ b/test/baseline/cmd-commodities.test
@@ -15,10 +15,10 @@
Income:Rewards
test commodities
-GBP
-AAA
"AA2"
"M&M"
+AAA
+GBP
end test
test commodities Assets:Rewards
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-count.test b/test/baseline/opt-count.test
index 9c5495c8..7c935c7a 100644
--- a/test/baseline/opt-count.test
+++ b/test/baseline/opt-count.test
@@ -17,14 +17,14 @@
Assets:Cash -30.00 EUR
test accounts --count
-2 Expenses:Phone
4 Assets:Cash
+2 Expenses:Phone
2 Expenses:Rent
end test
test commodities --count
-4 GBP
4 EUR
+4 GBP
end test
test payees --count
@@ -33,8 +33,8 @@ test payees --count
end test
test commodities :rent --count
-1 GBP
1 EUR
+1 GBP
end test
test payees tag bnb --count
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