diff options
author | Nathan Gass <gass@search.ch> | 2011-01-12 14:16:35 +0100 |
---|---|---|
committer | Nathan Gass <gass@search.ch> | 2011-01-12 14:16:35 +0100 |
commit | ec4deb25327cd525d188093918330149d0ead4e7 (patch) | |
tree | 8f268b91b644b2d6f5e0821b79190624d0f43651 /tests/Latex | |
parent | 4f6099f350a878420b403af5413a806c06694207 (diff) | |
download | pandoc-ec4deb25327cd525d188093918330149d0ead4e7.tar.gz |
Added some basic testing infrastructure and some latex reader tests.
Diffstat (limited to 'tests/Latex')
-rw-r--r-- | tests/Latex/Reader.hs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/Latex/Reader.hs b/tests/Latex/Reader.hs new file mode 100644 index 000000000..d313b33eb --- /dev/null +++ b/tests/Latex/Reader.hs @@ -0,0 +1,35 @@ +module Latex.Reader (tests) where + +import Text.Pandoc.Definition + +import Test.Framework +import Helpers + +tests :: [Test] +tests = [ testGroup "basic" [ latexTest "simplest" "word" + (Inline $ Str "word") + + , latexTest "space" "some text" + (Inlines $ [Str "some", Space, Str "text"]) + + , latexTest "emphasis" "\\emph{emphasized}" + (Inline $ Emph [Str "emphasized"]) + ] + + , testGroup "headers" [ latexTest "1. level" "\\section{header}" + $ Block $ Header 1 [Str "header"] + + , latexTest "2. level" "\\subsection{header}" + $ Block $ Header 2 [Str "header"] + + , latexTest "3. level" "\\subsubsection{header}" + $ Block $ Header 3 [Str "header"] + + , latexTest "with emphasis" "\\section{text \\emph{emph}}" + $ Block $ Header 1 [Str "text", Space, Emph [Str "emph"]] + + , latexTest "with link" "\\section{text \\href{/url}{link}}" + $ Block $ Header 1 [Str "text", Space, Link [Str "link"] ("/url", "")] + ] + ] + |