on master help sign in
Modify test suite for Accept parser

Add cases for extra params and for sorting by specificity.

commit16e70b8a1a692698b7915d4dac68a5804526b5f9 authorStephen Paul Weber <singpolyma@singpolyma.net> dateTue 9 Oct 2012, 23:07 (14 years ago) parentecd53e3
1 file changed+2−2
wai-extra/test/WaiExtraTest.hs+2−2
wai-extra/test/WaiExtraTest.hs+2−2
@@ -97,8 +97,8 @@ caseParseQueryStringQM = do
9797
9898caseParseHttpAccept :: Assertion
9999caseParseHttpAccept = do
100− let input = "text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c"
101− expected = ["text/html", "text/x-c", "text/x-dvi", "text/plain"]
100+ let input = "text/plain; q=0.5, text/html;charset=utf-8, text/*;q=0.8;ext=blah, text/x-dvi; q=0.8, text/x-c"
101+ expected = ["text/html;charset=utf-8", "text/x-c", "text/x-dvi", "text/*", "text/plain"]
102102 expected @=? parseHttpAccept input
103103
104104parseRequestBody' :: BackEnd L.ByteString