diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2012-03-22 21:48:50 +0000 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2012-03-22 21:48:50 +0000 |
commit | 62943c6005683ad0d6952bc8d3c6a4ef6f95cfe8 (patch) | |
tree | 4b7b570208128533a620571e556da192de941f2c /test | |
parent | 10e312cb78144f4d32cde8a5588880be36c927dc (diff) | |
download | fork-ledger-62943c6005683ad0d6952bc8d3c6a4ef6f95cfe8.tar.gz fork-ledger-62943c6005683ad0d6952bc8d3c6a4ef6f95cfe8.tar.bz2 fork-ledger-62943c6005683ad0d6952bc8d3c6a4ef6f95cfe8.zip |
Add more test cases
Diffstat (limited to 'test')
-rw-r--r-- | test/baseline/opt-file.test | 12 | ||||
-rw-r--r-- | test/baseline/opt-file1.dat | 4 | ||||
-rw-r--r-- | test/baseline/opt-file2.dat | 4 | ||||
-rw-r--r-- | test/regress/15A80F68.test | 15 | ||||
-rw-r--r-- | test/regress/DDB54BB8.test | 18 | ||||
-rw-r--r-- | test/regress/E2E479BC.test | 17 |
6 files changed, 70 insertions, 0 deletions
diff --git a/test/baseline/opt-file.test b/test/baseline/opt-file.test new file mode 100644 index 00000000..e01d929d --- /dev/null +++ b/test/baseline/opt-file.test @@ -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 + diff --git a/test/baseline/opt-file1.dat b/test/baseline/opt-file1.dat new file mode 100644 index 00000000..394882cd --- /dev/null +++ b/test/baseline/opt-file1.dat @@ -0,0 +1,4 @@ +2012-03-22 * Test 1 + A 10.00 + B + diff --git a/test/baseline/opt-file2.dat b/test/baseline/opt-file2.dat new file mode 100644 index 00000000..569993f8 --- /dev/null +++ b/test/baseline/opt-file2.dat @@ -0,0 +1,4 @@ +2012-03-22 * Test 2 + B 10.00 + C + diff --git a/test/regress/15A80F68.test b/test/regress/15A80F68.test new file mode 100644 index 00000000..0b29b82d --- /dev/null +++ b/test/regress/15A80F68.test @@ -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 + diff --git a/test/regress/DDB54BB8.test b/test/regress/DDB54BB8.test new file mode 100644 index 00000000..7d72043c --- /dev/null +++ b/test/regress/DDB54BB8.test @@ -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 + diff --git a/test/regress/E2E479BC.test b/test/regress/E2E479BC.test new file mode 100644 index 00000000..8216028a --- /dev/null +++ b/test/regress/E2E479BC.test @@ -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 + |