-USING: furnace furnace.actions furnace.callbacks accessors\r
-http http.server http.server.responses tools.test\r
-namespaces io fry sequences\r
-splitting kernel hashtables continuations ;\r
-IN: furnace.callbacks.tests\r
-\r
-[ 123 ] [\r
- [\r
- <request> "GET" >>method init-request\r
- [\r
- exit-continuation set\r
- { }\r
- <action> [ [ "hello" print 123 ] show-final ] >>display\r
- <callback-responder>\r
- call-responder\r
- ] callcc1\r
- ] with-scope\r
-] unit-test\r
-\r
-[\r
- <action> [\r
- [\r
- "hello" print\r
- <html-content>\r
- ] show-page\r
- "byebye" print\r
- [ 123 ] show-final\r
- ] >>display\r
- <callback-responder> "r" set\r
-\r
- [ 123 ] [\r
- <request> init-request\r
-\r
- [\r
- exit-continuation set\r
- <request> "GET" >>method init-request\r
- { } "r" get call-responder\r
- ] callcc1\r
-\r
- body>> first\r
-\r
- <request>\r
- "GET" >>method\r
- dup url>> rot cont-id associate >>query drop\r
- dup url>> "/" >>path drop\r
- init-request\r
-\r
- [\r
- exit-continuation set\r
- { }\r
- "r" get call-responder\r
- ] callcc1\r
-\r
- ! get-post-get\r
- <request>\r
- "GET" >>method\r
- dup url>> rot "location" header query>> >>query drop\r
- dup url>> "/" >>path drop\r
- init-request\r
-\r
- [\r
- exit-continuation set\r
- { }\r
- "r" get call-responder\r
- ] callcc1\r
- ] unit-test\r
-] with-scope\r
+USING: furnace furnace.actions furnace.callbacks accessors
+http http.server http.server.responses tools.test
+namespaces io fry sequences
+splitting kernel hashtables continuations ;
+IN: furnace.callbacks.tests
+
+[ 123 ] [
+ [
+ <request> "GET" >>method init-request
+ [
+ exit-continuation set
+ { }
+ <action> [ [ "hello" print 123 ] show-final ] >>display
+ <callback-responder>
+ call-responder
+ ] callcc1
+ ] with-scope
+] unit-test
+
+[
+ <action> [
+ [
+ "hello" print
+ <html-content>
+ ] show-page
+ "byebye" print
+ [ 123 ] show-final
+ ] >>display
+ <callback-responder> "r" set
+
+ [ 123 ] [
+ <request> init-request
+
+ [
+ exit-continuation set
+ <request> "GET" >>method init-request
+ { } "r" get call-responder
+ ] callcc1
+
+ body>> first
+
+ <request>
+ "GET" >>method
+ dup url>> rot cont-id associate >>query drop
+ dup url>> "/" >>path drop
+ init-request
+
+ [
+ exit-continuation set
+ { }
+ "r" get call-responder
+ ] callcc1
+
+ ! get-post-get
+ <request>
+ "GET" >>method
+ dup url>> rot "location" header query>> >>query drop
+ dup url>> "/" >>path drop
+ init-request
+
+ [
+ exit-continuation set
+ { }
+ "r" get call-responder
+ ] callcc1
+ ] unit-test
+] with-scope