From 8ff81dc9caaff9e5dffbbe9148dfcf547c27d147 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 7 Jan 2013 20:58:12 -0800 Subject: Updated tests for tight/loose lists. Taking into account new context/latex output, and fixing some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt. (We had the wrong order of expected/actual in the diff output.) --- tests/Tests/Helpers.hs | 4 ++-- tests/Tests/Writers/ConTeXt.hs | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'tests/Tests') diff --git a/tests/Tests/Helpers.hs b/tests/Tests/Helpers.hs index 9e00af456..e3148c260 100644 --- a/tests/Tests/Helpers.hs +++ b/tests/Tests/Helpers.hs @@ -62,8 +62,8 @@ test fn name (input, expected) = actual' = toString $ fn input expected' = toString expected diff = getDiff (lines expected') (lines actual') - expected'' = unlines $ map vividize [Second x | Second x <- diff] - actual'' = unlines $ map vividize [First x | First x <- diff] + expected'' = unlines $ map vividize [First x | First x <- diff] + actual'' = unlines $ map vividize [Second x | Second x <- diff] dashes "" = replicate 72 '-' dashes x = replicate (72 - length x - 5) '-' ++ " " ++ x ++ " ---" diff --git a/tests/Tests/Writers/ConTeXt.hs b/tests/Tests/Writers/ConTeXt.hs index 2cb8ececa..68e32cf58 100644 --- a/tests/Tests/Writers/ConTeXt.hs +++ b/tests/Tests/Writers/ConTeXt.hs @@ -46,19 +46,20 @@ tests = [ testGroup "inline code" ] , testGroup "bullet lists" [ "nested" =: - bulletList [plain (text "top") - ,bulletList [plain (text "next") - ,bulletList [plain (text "bot")]]] - =?> [_LIT| -\startitemize + bulletList [ + plain (text "top") + <> bulletList [ + plain (text "next") + <> bulletList [plain (text "bot")] + ] + ] =?> [_LIT| +\startitemize[packed] \item top -\item - \startitemize + \startitemize[packed] \item next - \item - \startitemize + \startitemize[packed] \item bot \stopitemize -- cgit v1.2.3