data: fix unit test by ignoring sourcepos

This commit is contained in:
Julien Moutinho 2014-08-07 17:47:21 +02:00
parent a6190420b2
commit ec243a1bea

View File

@ -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
[