Skip to content

Commit

Permalink
Add regression tests for #54
Browse files Browse the repository at this point in the history
  • Loading branch information
fimad committed Apr 25, 2017
1 parent cf07144 commit 6f5aaab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scalpel-core/tests/TestMain.hs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,21 @@ scrapeTests = "scrapeTests" ~: TestList [
"<div><p>p1</p><p>p2</p><blockquote><p>p3</p></blockquote><p>p4</p>"
(Just ["p1", "p2", "p3", "p4"])
(texts "p")

, scrapeTest
"<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"
(Just ["1","2","3"])
(texts "a")

, scrapeTest
"<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"
(Just ["1","2","3"])
(texts $ "a" // "b")

, scrapeTest
"<a><b>1</b></a><a><b>2</b></a><a><b>3</b></a>"
(Just ["1","2","3"])
(texts "b")
]

scrapeTest :: (Eq a, Show a) => String -> Maybe a -> Scraper String a -> Test
Expand Down

0 comments on commit 6f5aaab

Please sign in to comment.