1 ! Copyright (C) 2009 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
4 USING: cgi cgi.private kernel tools.test ;
6 [ t ] [ H{ } "" (query-string) = ] unit-test
8 [ t ] [ H{ { "a" { "1" } } { "b" { "2" } } }
9 "a=1&b=2" (query-string) = ] unit-test
11 [ t ] [ H{ { "a" { "1" } } { "b" { "2" "3" } } }
12 "a=1&b=2&b=3" (query-string) = ] unit-test
14 [ t ] [ "text/html" (content-type)
15 [ H{ } = ] [ "text/html" = ] bi* and ] unit-test
17 [ t ] [ "text/html; charset=utf-8" (content-type)
18 [ H{ { "charset" { "utf-8" } } } = ]
19 [ "text/html" = ] bi* and ] unit-test