@@ -0,0 +1,29 @@
1+{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
2+module Tests.Readers.Markdown (tests) where
3+
4+import Text.Pandoc.Definition
5+import Test.Framework
6+import Tests.Helpers
7+import Tests.Arbitrary()
8+import Text.Pandoc.Builder
9+import Text.Pandoc
10+
11+markdown :: String -> Pandoc
12+markdown = readMarkdown defaultParserState{ stateStandalone = True }
13+
14+infix 5 =:
15+(=:) :: ToString c
16+ => String -> (String, c) -> Test
17+(=:) = test markdown
18+
19+tests :: [Test]
20+tests = [ testGroup "inline code"
21+ [ "with attribute" =:
22+ "`document.write(\"Hello\");`{.javascript}"
23+ =?> para
24+ (codeWith ("",["javascript"],[]) "document.write(\"Hello\");")
25+ , "with attribute space" =:
26+ "`*` {.haskell .special x=\"7\"}"
27+ =?> para (codeWith ("",["haskell","special"],[("x","7")]) "*")
28+ ]
29+ ]