]> gitweb.factorcode.org Git - factor.git/blob - basis/http/server/server-tests.factor
171973fcd8fcb01c44ddcdffe99fdfa52da03d69
[factor.git] / basis / http / server / server-tests.factor
1 USING: http http.server math sequences continuations tools.test
2 io.encodings.utf8 io.encodings.binary accessors ;
3 IN: http.server.tests
4
5 [ t ] [ [ \ + first ] [ <500> ] recover response? ] unit-test
6
7 \ make-http-error must-infer
8
9 [ "text/plain; charset=UTF-8" ] [
10     <response>
11         "text/plain" >>content-type
12         utf8 >>content-charset
13     unparse-content-type
14 ] unit-test
15
16 [ "text/xml" ] [
17     <response>
18         "text/xml" >>content-type
19         binary >>content-charset
20     unparse-content-type
21 ] unit-test