clarify historical price field and tests

This commit is contained in:
Simon Michael 2012-11-20 00:27:43 +00:00
parent 9bc286c352
commit 4248df5c6f
2 changed files with 13 additions and 3 deletions

View File

@ -123,7 +123,7 @@ data TimeLogEntry = TimeLogEntry {
data HistoricalPrice = HistoricalPrice {
hdate :: Day,
hsymbol :: String,
hcommodity :: Commodity,
hamount :: Amount
} deriving (Eq) -- & Show (in Amount.hs)

View File

@ -175,15 +175,25 @@ hledgerdev -f - balance
c $-30
>>>= 0
# 14. this should balance, ignoring the P
# 14. we ignore P, so this should balance
hledgerdev -f - balance
<<<
P 2011/11/15 EUR CHF 1.234
P 2011/11/15 EUR CHF 1
2011/11/19
a EUR 1000.00
b CHF -1254
>>>= 0
# # 14b. if P worked, this should balance
# hledgerdev -f - balance
# <<<
# P 2011/11/15 EUR CHF 1.234
# 2011/11/19
# a EUR 1000.00
# b USD 1000.00
# c CHF -1254
# >>>= 0
# 15. these balance because of the unit prices, and should parse successfully
hledgerdev -f - balance --no-total
<<<