diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-27 19:56:21 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-27 19:56:21 -0700 |
commit | ad9447cf92429929adda00ecbf1bdeb4b7502e6f (patch) | |
tree | c0a302528d85e1e05212a724467514f2d646e4ed /tests/Tests/Writers | |
parent | 1d91e2cdb380a22b8d988291d726dd1612318b80 (diff) | |
parent | 4e4c948b417a597f17bd8be12b6e981a87f00506 (diff) | |
download | pandoc-ad9447cf92429929adda00ecbf1bdeb4b7502e6f.tar.gz |
Merge branch 'master' of github.com:jgm/pandoc
Diffstat (limited to 'tests/Tests/Writers')
-rw-r--r-- | tests/Tests/Writers/LaTeX.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index ebde5b97c..5f702a85d 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -10,6 +10,9 @@ import Tests.Arbitrary() latex :: (ToString a, ToPandoc a) => a -> String latex = writeLaTeX def . toPandoc +latexListing :: (ToString a, ToPandoc a) => a -> String +latexListing = writeLaTeX def{ writerListings = True } . toPandoc + {- "my test" =: X =?> Y @@ -31,6 +34,10 @@ tests :: [Test] tests = [ testGroup "code blocks" [ "in footnotes" =: note (para "hi" <> codeBlock "hi") =?> "\\footnote{hi\n\n\\begin{Verbatim}\nhi\n\\end{Verbatim}\n}" + , test latexListing "identifier" $ codeBlockWith ("id",[],[]) "hi" =?> + ("\\begin{lstlisting}[label=id]\nhi\n\\end{lstlisting}" :: String) + , test latexListing "no identifier" $ codeBlock "hi" =?> + ("\\begin{lstlisting}\nhi\n\\end{lstlisting}" :: String) ] , testGroup "math" [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> |