From 6889ef69d6ffad53a292555615df2c2b336f93db Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Fri, 8 Apr 2011 17:09:28 +0000 Subject: Add support for blank lines in the result of examples Result lines that only contain the string "" are treated as a blank line. --- tests/html-tests/tests/Examples.hs | 5 +++++ tests/html-tests/tests/Examples.html.ref | 12 ++++++++++++ tests/unit-tests/parsetests.hs | 6 ++++++ 3 files changed, 23 insertions(+) (limited to 'tests') diff --git a/tests/html-tests/tests/Examples.hs b/tests/html-tests/tests/Examples.hs index 7b703428..c8c450f1 100644 --- a/tests/html-tests/tests/Examples.hs +++ b/tests/html-tests/tests/Examples.hs @@ -28,6 +28,11 @@ module Examples where -- >>> isSpace 'a' -- False -- +-- >>> putStrLn "foo\n\nbar" +-- foo +-- +-- bar +-- fib :: Integer -> Integer fib 0 = 0 fib 1 = 1 diff --git a/tests/html-tests/tests/Examples.html.ref b/tests/html-tests/tests/Examples.html.ref index 69b2fda4..61fcff1c 100644 --- a/tests/html-tests/tests/Examples.html.ref +++ b/tests/html-tests/tests/Examples.html.ref @@ -135,6 +135,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_Examples.html");}; False +
>>> putStrLn "foo\n\nbar"
+foo
+
+bar
 
support + , ParseTest { + input = ">>> putFooBar\nfoo\n\nbar" + , result = Just $ DocExamples $ [Example "putFooBar" ["foo","","bar"]] + } ] -- cgit v1.2.3