diff options
author | Clint Adams <clint@debian.org> | 2012-11-06 22:49:28 -0500 |
---|---|---|
committer | Clint Adams <clint@debian.org> | 2012-11-06 23:13:53 -0500 |
commit | d819bd5f3a308eb068ee4b51ae4290b62ad9952a (patch) | |
tree | 499385182492fddbf7f7f9b17a961c5c71f05728 /tests/Tests/Writers/LaTeX.hs | |
parent | 3f2eb64830a28b9022887bf238a155c89d0812f1 (diff) |
Imported Upstream version 1.9.4.5
Diffstat (limited to 'tests/Tests/Writers/LaTeX.hs')
-rw-r--r-- | tests/Tests/Writers/LaTeX.hs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs new file mode 100644 index 000000000..7987716f3 --- /dev/null +++ b/tests/Tests/Writers/LaTeX.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} +module Tests.Writers.LaTeX (tests) where + +import Test.Framework +import Text.Pandoc.Builder +import Text.Pandoc +import Tests.Helpers +import Tests.Arbitrary() + +latex :: (ToString a, ToPandoc a) => a -> String +latex = writeLaTeX defaultWriterOptions . toPandoc + +{- + "my test" =: X =?> Y + +is shorthand for + + test latex "my test" $ X =?> Y + +which is in turn shorthand for + + test latex "my test" (X,Y) +-} + +infix 4 =: +(=:) :: (ToString a, ToPandoc a) + => String -> (a, String) -> Test +(=:) = test latex + +tests :: [Test] +tests = [ testGroup "code blocks" + [ "in footnotes" =: note (para "hi" <> codeBlock "hi") =?> + "\\footnote{hi\n\n\\begin{Verbatim}\nhi\n\\end{Verbatim}\n}" + ] + ] |