1 USING: kernel furnace.actions validators
2 tools.test math math.parser multiline namespaces http
3 io.streams.string http.server sequences splitting accessors ;
4 IN: furnace.actions.tests
7 [ "a" param "b" param [ string>number ] bi@ + ] >>display
10 : lf>crlf "\n" split "\r\n" join ;
12 STRING: action-request-test-1
13 GET http://foo/bar?a=12&b=13 HTTP/1.1
19 action-request-test-1 lf>crlf
20 [ read-request ] with-string-reader
22 { } "action-1" get call-responder
27 [ "a" param string>number sq ] >>display
30 STRING: action-request-test-2
31 GET http://foo/bar/123 HTTP/1.1
37 action-request-test-2 lf>crlf
38 [ read-request ] with-string-reader
40 { "5" } "action-2" get call-responder