diff --git a/hledger/Hledger/Cli.hs b/hledger/Hledger/Cli.hs index 68e938b99..9961a1245 100644 --- a/hledger/Hledger/Cli.hs +++ b/hledger/Hledger/Cli.hs @@ -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 [