rename refdate/reftime in Tests to reduce accidental collisions while we are importing everything
This commit is contained in:
parent
d8989a357d
commit
54b0ef607a
15
Tests.hs
15
Tests.hs
@ -128,8 +128,8 @@ misc_tests = TestList [
|
|||||||
assertparseequal timelog1 (parseWithCtx timelog timelog1_str)
|
assertparseequal timelog1 (parseWithCtx timelog timelog1_str)
|
||||||
,
|
,
|
||||||
"parsedate" ~: do
|
"parsedate" ~: do
|
||||||
assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" refdate) (parsedate "2008/02/03")
|
assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" sampledate) (parsedate "2008/02/03")
|
||||||
assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" refdate) (parsedate "2008-02-03")
|
assertequal (parsetimewith "%Y/%m/%d" "2008/02/03" sampledate) (parsedate "2008-02-03")
|
||||||
,
|
,
|
||||||
"smart dates" ~: do
|
"smart dates" ~: do
|
||||||
let todaysdate = parsedate "2008/11/26" -- wednesday
|
let todaysdate = parsedate "2008/11/26" -- wednesday
|
||||||
@ -456,7 +456,7 @@ balancecommand_tests = TestList [
|
|||||||
(showBalanceReport [] [] l)
|
(showBalanceReport [] [] l)
|
||||||
,
|
,
|
||||||
"balance report elides zero-balance root account(s)" ~: do
|
"balance report elides zero-balance root account(s)" ~: do
|
||||||
l <- ledgerfromstringwithopts [] [] reftime
|
l <- ledgerfromstringwithopts [] [] sampletime
|
||||||
("2008/1/1 one\n" ++
|
("2008/1/1 one\n" ++
|
||||||
" test:a 1\n" ++
|
" test:a 1\n" ++
|
||||||
" test:b\n"
|
" test:b\n"
|
||||||
@ -569,11 +569,10 @@ registercommand_tests = TestList [
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
-- test data
|
-- test data
|
||||||
|
|
||||||
refdate = parsedate "2008/11/26"
|
sampledate = parsedate "2008/11/26"
|
||||||
reftime = dayToUTC refdate
|
sampletime = LocalTime sampledate midday
|
||||||
sampleledger = ledgerfromstringwithopts [] [] reftime sample_ledger_str
|
sampleledger = ledgerfromstringwithopts [] [] sampletime sample_ledger_str
|
||||||
sampleledgerwithopts opts args = ledgerfromstringwithopts opts args reftime sample_ledger_str
|
sampleledgerwithopts opts args = ledgerfromstringwithopts opts args sampletime sample_ledger_str
|
||||||
--sampleledgerwithoptsanddate opts args date = unsafePerformIO $ ledgerfromstringwithopts opts args date sample_ledger_str
|
|
||||||
|
|
||||||
sample_ledger_str = (
|
sample_ledger_str = (
|
||||||
"; A sample ledger file.\n" ++
|
"; A sample ledger file.\n" ++
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user