From 2c9ea89ff78bb3b22c0b6e0f095b4a5fba67d691 Mon Sep 17 00:00:00 2001 From: David Lazar Date: Thu, 4 Apr 2013 23:19:02 -0700 Subject: Haddock reader: add tests. --- tests/haddock-reader.haddock | 65 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'tests/haddock-reader.haddock') diff --git a/tests/haddock-reader.haddock b/tests/haddock-reader.haddock index e69de29bb..63669022b 100644 --- a/tests/haddock-reader.haddock +++ b/tests/haddock-reader.haddock @@ -0,0 +1,65 @@ +This file tests the Pandoc reader for Haddock. +We've borrowed examples from Haddock's documentation: . + +The following characters have special meanings in Haddock, \/, \', \`, \", \@, \<, so they must be escaped. + +\* This is a paragraph, not a list item. +\> This sentence is not code. +\>\>\> This is not an example. + +The references λ, λ and λ all represent the lower-case letter lambda. + +This is a code block: + +> map :: (a -> b) -> [a] -> [b] +> map _ [] = [] +> map f (x:xs) = f x : map f xs + +This is another code block: + +@ + f x = x + x. + The \@...\@ code block /interprets markup normally/. + "Module.Foo" + \"Hello World\" +@ + +Haddock supports REPL examples: + +>>> fib 10 +55 +>>> putStrLn "foo\nbar" +foo +bar + +That was /really cool/! +I had no idea @fib 10 = 55@. + +This module defines the type 'T'. +The identifier 'M.T' is not in scope +I don't have to escape my apostrophes; great, isn't it? +This is a reference to the "Foo" module. + +This is a bulleted list: + + * first item + + * second item + +This is an enumerated list: + + (1) first item + + 2. second item + +This is a definition list: + + [@foo@] The description of @foo@. + + [@bar@] The description of @bar@. + +Here is a link: + + is a fun language! + + -- cgit v1.2.3