]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - tests/WikiParserTest.hs
Implemented block commands
[Rakka.git] / tests / WikiParserTest.hs
index d8772a192ebc2917f8fdfe100562b6eb2dfc65ca..026dcaa87fabde522f7864c80d5430172583d8e3 100644 (file)
@@ -320,4 +320,19 @@ testData = [ (parseWiki ""
                                               , Text "\n"
                                               , Text "bar"
                                               ]) ] ]))
+
+           , (parseWiki "<div>foo</div>"
+              ~?=
+              (Right [ BlockCmd (BlockCommand "div" []
+                                 [ Paragraph [Text "foo"] ]) ]))
+
+           , (parseWiki "<div><!-- comment --></div>"
+              ~?=
+              (Right [ BlockCmd (BlockCommand "div" [] []) ]))
+
+           , (parseWiki "foo<div id=\"bar\"/>"
+              ~?=
+              (Right [ Paragraph [Text "foo"]
+                     , BlockCmd (BlockCommand "div" [("id", "bar")] [])
+                     ]))
            ]