mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
data: fix unit test by ignoring sourcepos
This commit is contained in:
parent
a6190420b2
commit
ec243a1bea
@ -63,8 +63,9 @@ tests_Hledger_Cli = TestList
|
||||
|
||||
|
||||
,"account directive" ~:
|
||||
let sameParse str1 str2 = do j1 <- readJournal Nothing Nothing True Nothing str1 >>= either error' return
|
||||
j2 <- readJournal Nothing Nothing True Nothing str2 >>= either error' return
|
||||
let ignoresourcepos j = j{jtxns=map (\t -> t{tsourcepos=nullsourcepos}) (jtxns j)} in
|
||||
let sameParse str1 str2 = do j1 <- readJournal Nothing Nothing True Nothing str1 >>= either error' (return . ignoresourcepos)
|
||||
j2 <- readJournal Nothing Nothing True Nothing str2 >>= either error' (return . ignoresourcepos)
|
||||
j1 `is` j2{filereadtime=filereadtime j1, files=files j1, jContext=jContext j1}
|
||||
in TestList
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user