convert a few doctests to shell test format

This commit is contained in:
Simon Michael 2009-06-27 08:16:19 +00:00
parent 6b2e735ba1
commit 9bdb1ab0ec
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,20 @@
register
<<<
2009/6/24 carwash
equity:draw:personal:transportation:car:carwash $3.50
assets:cash
[expenses:car] $3.50
[simon]
>>>
>>>2
"-" (line 6, column 1):
unexpected end of input
could not balance this transaction, amounts do not add up to zero:
2009/06/24 carwash
equity:draw:personal:transportatio $3.50
assets:cash
[expenses:car] $3.50
[simon]
===0

View File

@ -0,0 +1,9 @@
-f sample.ledger balance --depth 1
<<<
>>>
$-1 assets
$2 expenses
$-2 income
$1 liabilities
>>>2
===0

View File

@ -0,0 +1,11 @@
-f sample.ledger balance o
<<<
>>>1
$1 expenses:food
$-2 income
$-1 gifts
$-1 salary
--------------------
$-1
>>>2
===0

15
tests/sample-balance.test Normal file
View File

@ -0,0 +1,15 @@
-f sample.ledger balance
<<<
>>>1
$-1 assets
$1 bank:saving
$-2 cash
$2 expenses
$1 food
$1 supplies
$-2 income
$-1 gifts
$-1 salary
$1 liabilities:debts
>>>2
===0

17
tests/unbalanced.test Normal file
View File

@ -0,0 +1,17 @@
; shouldn't exit code be 1 ?
register
<<<
2009/1/1 a
b 1.1
c -1
>>>
>>>2
"-" (line 4, column 1):
unexpected end of input
could not balance this transaction, amounts do not add up to zero:
2009/01/01 a
b 1.1
c -1
===0