use with-variable in some places with-scope was used.

char-rename
John Benediktsson 2017-01-03 19:12:29 -08:00
parent f9b9ce20f2
commit 3974ba8ba3
3 changed files with 8 additions and 15 deletions

View File

@ -237,13 +237,12 @@ http.server.dispatchers db.tuples ;
] unit-test
: test-with-dispatcher ( dispatcher quot -- )
'[
main-responder set
[ main-responder ] dip '[
<http-server> 0 >>insecure f >>secure
[
server-addrs random "addr" set @
] with-threaded-server
] with-scope ; inline
] with-variable ; inline
USING: locals ;

View File

@ -32,13 +32,9 @@ MACRO: finish-nmake ( exemplars -- quot )
length [ firstn ] curry ;
:: nmake ( quot exemplars -- )
[
exemplars
[ 0 swap new-resizable ] map
building-seq set
exemplars [ 0 swap new-resizable ] map
building-seq [
quot call
building-seq get
exemplars [ [ like ] 2map ] [ finish-nmake ] bi
] with-scope ; inline
] with-variable ; inline

View File

@ -73,7 +73,7 @@ os macosx? [
"tools.deploy.test.3"
"tools.deploy.test.4"
} [
[ ] swap [
{ } swap [
shake-and-bake
run-temp-image
] curry unit-test
@ -91,16 +91,14 @@ M: quit-responder call-responder*
quit-responder "quit" add-responder ;
: test-httpd ( responder -- )
[
main-responder set
main-responder [
<http-server>
0 >>insecure
f >>secure
start-server
servers>> first addr>> port>>
dup number>string "port-number" temp-file ascii set-file-contents
] with-scope
"port" set ;
] with-variable "port" set ;
{ } [
<dispatcher>