git.iko.soy/typeable/html-parse
on master help sign in
Add regression test.
commit96acd5366f56a2d653402d2779ae230ea75e6520 authorMatthias Fischmann <mf@zerobuzz.net> dateFri 30 Dec 2016, 12:32 (10 years ago) parent02fd95a
1 file changed+5
tests/Text/HTML/ParserSpec.hs+5
tests/Text/HTML/ParserSpec.hs+5
@@ -74,3 +74,8 @@ spec = do
7474 it "canonicalizeTokens is idempotent" . property . forAllShrink arbitrary shrink $
7575 \tokens
7676 -> canonicalizeTokens tokens `shouldBe` canonicalizeTokens (canonicalizeTokens tokens)
77+
78+ describe "regression tests" $ do
79+ describe "parseTokens" $ do
80+ it "works on `<h1>Heading</h1>`" $ do
81+ parseTokens "<h1>Heading</h1>" `shouldBe` [TagOpen "h1" [], ContentText "Heading", TagClose "h1"]