]> gitweb.factorcode.org Git - factor.git/blob - extra/cgi/cgi-tests.factor
Fixes #2966
[factor.git] / extra / cgi / cgi-tests.factor
1 ! Copyright (C) 2009 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: cgi cgi.private kernel linked-assocs tools.test ;
5
6 { LH{ } } [ "" query-string ] unit-test
7
8 { LH{ { "a" { "1" } } { "b" { "2" } } } }
9 [ "a=1&b=2" query-string ] unit-test
10
11 { LH{ { "a" { "1" } } { "b" { "2" "3" } } } }
12 [ "a=1&b=2&b=3" query-string ] unit-test
13
14 { LH{ } "text/html" } [ "text/html" content-type ] unit-test
15
16 { LH{ { "charset" { "utf-8" } } } "text/html" }
17 [ "text/html; charset=utf-8" content-type ] unit-test