Closed
Description
The library currently doesn't have tests in the test suite. It does have a Travis file to run tests in continuous integration, and @nsaunders has provided a few test cases:
> decode "a=aa&b=bb"
(Just (FormURLEncoded [(Tuple "a" (Just "aa")),(Tuple "b" (Just "bb"))]))
> decode "this=this%3Dthis"
(Just (FormURLEncoded [(Tuple "this" (Just "this=this"))]))
> decode "&x=x&&y=y&z="
(Just (FormURLEncoded [(Tuple "" Nothing),(Tuple "x" (Just "x")),(Tuple "" Nothing),(Tuple "y" (Just "y")),(Tuple "z" (Just ""))]))
> decode "a=b&%8A=c"
Nothing
> encode =<< decode "a=aa&b=bb"
(Just "a=aa&b=bb")
> encode =<< decode "this=this%3Dthis"
(Just "this=this%3Dthis")
> encode =<< decode "&x=x&&y=y&z="
(Just "&x=x&&y=y&z=")
> encode =<< decode "a=b&%8A=c"
Nothing
These tests should be added to the tests/
directory so they are checked in CI when new pull requests are opened.