fix all recently-broken tests

This commit is contained in:
Simon Michael 2009-11-25 12:21:59 +00:00
parent cb89dd2b94
commit 53b7962658
10 changed files with 47 additions and 35 deletions

View File

@ -670,7 +670,7 @@ tests = [
["2008/06/03 * eat & shop"
," expenses:food $1"
," expenses:supplies $1"
," assets:cash"
," assets:cash $-2"
,""
]
@ -687,7 +687,7 @@ tests = [
,"2008/06/03 * eat & shop"
," expenses:food $1"
," expenses:supplies $1"
," assets:cash"
," assets:cash $-2"
,""
,"2008/12/31 * pay off"
," liabilities:debts $1"
@ -841,6 +841,18 @@ tests = [
[Posting False "expenses:food:groceries" (Mixed [dollars 47.18]) "" RegularPosting
,Posting False "assets:checking" (Mixed [dollars (-47.18)]) "" RegularPosting
] ""))
assertEqual "show a balanced transaction, no eliding"
(unlines
["2007/01/28 coopportunity"
," expenses:food:groceries $47.18"
," assets:checking $-47.18"
,""
])
(showLedgerTransactionUnelided
(LedgerTransaction (parsedate "2007/01/28") Nothing False "" "coopportunity" ""
[Posting False "expenses:food:groceries" (Mixed [dollars 47.18]) "" RegularPosting
,Posting False "assets:checking" (Mixed [dollars (-47.18)]) "" RegularPosting
] ""))
-- document some cases that arise in debug/testing:
assertEqual "show an unbalanced transaction, should not elide"
(unlines

View File

@ -7,5 +7,5 @@
>>>
2009/01/01 x
a 1
b
b -1

View File

@ -7,5 +7,5 @@
>>>
2009/01/01 x
a 1
b
b -1

View File

@ -6,5 +6,5 @@
>>>
2010/01/01 x
a 1
b
b -1

View File

@ -8,5 +8,5 @@
2009/01/01 x
a 2
b (b) b -1
c
c -1

View File

@ -11,7 +11,7 @@
2009/01/01 x ; description comment
a 1 ; amount comment
; middle posting comment
b
b -1
; trailing posting comment
; post-entry comment (?)

View File

@ -6,5 +6,5 @@
>>>
2009/01/01 проверка
счёт:первый 1
счёт:второй
счёт:второй -1

View File

@ -8,5 +8,5 @@
2009/01/01 x
(virtual) 100
a 1
b
b -1