From fd74da0836b9eab76f3eb38e600fd9bcd5528648 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 9 Jun 2017 18:27:04 -0700 Subject: [PATCH] cli: drop an unnecessary test grouping causing unwanted output --- hledger/Hledger/Cli.hs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hledger/Hledger/Cli.hs b/hledger/Hledger/Cli.hs index 0f4ff1c1e..6469a85e0 100644 --- a/hledger/Hledger/Cli.hs +++ b/hledger/Hledger/Cli.hs @@ -75,14 +75,12 @@ tests_Hledger_Cli = TestList -- ,tests_Hledger_Cli_Stats - ,"apply account directive" ~: - 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{jlastreadtime=jlastreadtime j1, jfiles=jfiles j1} --, jparsestate=jparsestate j1} - in TestList - [ - "apply account directive 1" ~: sameParse + ,"apply account directive" ~: + 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{jlastreadtime=jlastreadtime j1, jfiles=jfiles j1} --, jparsestate=jparsestate j1} + in sameParse ("2008/12/07 One\n alpha $-1\n beta $1\n" <> "apply account outer\n2008/12/07 Two\n aigh $-2\n bee $2\n" <> "apply account inner\n2008/12/07 Three\n gamma $-3\n delta $3\n" <> @@ -102,8 +100,6 @@ tests_Hledger_Cli = TestList assertBool "" $ paccount p == "test:from" assertBool "" $ ptype p == VirtualPosting - ] - ,"account aliases" ~: do j <- readJournal Nothing Nothing True Nothing "!alias expenses = equity:draw:personal\n1/1\n (expenses:food) 1\n" >>= either error' return let p = head $ tpostings $ head $ jtxns j