Add more test cases

This commit is contained in:
Martin Michlmayr 2012-03-22 21:48:50 +00:00
parent 10e312cb78
commit 62943c6005
6 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,12 @@
test -f opt-file-does-not-exist.dat bal -> 1
__ERROR__
Error: Cannot read journal file "opt-file-does-not-exist.dat"
end test
test -f test/baseline/opt-file1.dat -f test/baseline/opt-file2.dat bal
10 A
-10 C
--------------------
0
end test

View file

@ -0,0 +1,4 @@
2012-03-22 * Test 1
A 10.00
B

View file

@ -0,0 +1,4 @@
2012-03-22 * Test 2
B 10.00
C

View file

@ -0,0 +1,15 @@
; Test for: Confusing error message with ledger v3 with invalid input
2008/03/03
A (2 FOO @ 10.00 EUR) = 20.00 EUR
B
test bal -> 1
__ERROR__
While parsing file "$FILE", line 4:
While parsing posting:
A (2 FOO @ 10.00 EUR) = 20.00 EUR
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Invalid char '@'
end test

View file

@ -0,0 +1,18 @@
~ Monthly
Aufwand:Bargeld 0,30€
Aktiva:Bank:Girokonto -0,40€
test bal -> 1
__ERROR__
While parsing file "$FILE", line 3:
Unbalanced remainder is:
-0,10€
Amount to balance against:
0,30€
While parsing periodic transaction:
> ~ Monthly
> Aufwand:Bargeld 0,30€
> Aktiva:Bank:Girokonto -0,40€
Error: Transaction does not balance
end test

View file

@ -0,0 +1,17 @@
; Test for: ledger used to show multiple "Income:Unknown" in this
; case in the past, which it shouldn't.
2009/01/01 Sample
Expenses:Alpha 10 A
Expenses:Beta 10 B
Expenses:Gamma 10 C
Income:Unknown
test print
2009/01/01 Sample
Expenses:Alpha 10 A
Expenses:Beta 10 B
Expenses:Gamma 10 C
Income:Unknown
end test