on master help sign in
Add a stress test for many attributes
2d8de63Neil Mitchell
src/Main.hs+2
@@ -43,6 +43,8 @@ main = do
43 attributes (head $ children doc) === [Attribute "id" "1", Attribute "extra" "2"]
43 attributes (head $ children doc) === [Attribute "id" "1", Attribute "extra" "2"]
44 map (`attributeBy` "id") (childrenBy doc "test") === map (fmap (Attribute "id")) [Just "1", Just "2", Just "4", Nothing]
44 map (`attributeBy` "id") (childrenBy doc "test") === map (fmap (Attribute "id")) [Just "1", Just "2", Just "4", Nothing]
45
45
46+ Right _ <- return $ parse $ "<test " <> BS.unwords [BS.pack $ "x" ++ show i ++ "='value'" | i <- [1..10000]] <> " />"
47+ return ()
46
48
47a === b = if a == b then putStrLn "success" else fail "mismatch"
49a === b = if a == b then putStrLn "success" else fail "mismatch"
48
50