Simpler demonstration of descendent selector bug

This commit is contained in:
Michael Snoyman 2014-09-30 13:34:32 +03:00
parent 9a9cab4365
commit 4b85a66d93

View File

@ -44,6 +44,10 @@ main = hspec $ do
html = "<input name='_token' type='hidden' value='foo'><form class='foo'><input name='_token' type='hidden' value='bar'></form>"
expected = "<input name=\"_token\" type=\"hidden\" value=\"bar\" />"
in it query $ findBySelector_ html (pack query) @?= [expected]
it "descendents" $
let html = "<p><b><i>hello</i></b></p>"
query = "p i"
in findBySelector_ html query @?= ["<i>hello</i>"]
describe "HTML parsing" $ do
it "XHTML" $
let html = "<html><head><title>foo</title></head><body><p>Hello World</p></body></html>"