Fix unit tests
parent
d8edd7b0d4
commit
3eda26ca0b
|
@ -1,15 +1,12 @@
|
||||||
USING: webapps.file http.server.responders http
|
USING: webapps.file http.server.responders http
|
||||||
http.server namespaces io tools.test strings io.server ;
|
http.server namespaces io tools.test strings io.server
|
||||||
|
logging ;
|
||||||
IN: temporary
|
IN: temporary
|
||||||
|
|
||||||
[ ] [ f [ "404 not found" httpd-error ] with-logging ] unit-test
|
[ ] [ f [ "404 not found" httpd-error ] with-logging ] unit-test
|
||||||
|
|
||||||
[ "inspect/global" ] [ "/inspect/global" trim-/ ] unit-test
|
[ "inspect/global" ] [ "/inspect/global" trim-/ ] unit-test
|
||||||
|
|
||||||
[ ] [
|
|
||||||
f [ "unit/test" log-responder ] with-logging
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[ "index.html" ]
|
[ "index.html" ]
|
||||||
[ "http://www.jedit.org/index.html" url>path ] unit-test
|
[ "http://www.jedit.org/index.html" url>path ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ USING: kernel io io.timeouts continuations ;
|
||||||
TUPLE: null-stream ;
|
TUPLE: null-stream ;
|
||||||
|
|
||||||
M: null-stream dispose drop ;
|
M: null-stream dispose drop ;
|
||||||
M: null-stream set-timeout drop ;
|
M: null-stream set-timeout 2drop ;
|
||||||
M: null-stream stream-readln drop f ;
|
M: null-stream stream-readln drop f ;
|
||||||
M: null-stream stream-read1 drop f ;
|
M: null-stream stream-read1 drop f ;
|
||||||
M: null-stream stream-read-until 2drop f f ;
|
M: null-stream stream-read-until 2drop f f ;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
USING: smtp tools.test io.streams.string threads
|
USING: smtp tools.test io.streams.string threads
|
||||||
smtp.server kernel sequences namespaces ;
|
smtp.server kernel sequences namespaces logging ;
|
||||||
IN: temporary
|
IN: temporary
|
||||||
|
|
||||||
{ 0 0 } [ [ ] with-smtp-connection ] must-infer-as
|
{ 0 0 } [ [ ] with-smtp-connection ] must-infer-as
|
||||||
|
@ -15,34 +15,22 @@ IN: temporary
|
||||||
{ "hello" "world" } [ send-body ] string-out
|
{ "hello" "world" } [ send-body ] string-out
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[ "500 syntax error" check-response ] must-fail
|
||||||
[
|
|
||||||
"500 syntax error" check-response
|
|
||||||
] with-log-stdio
|
|
||||||
] must-fail
|
|
||||||
|
|
||||||
[ ] [
|
[ ] [ "220 success" check-response ] unit-test
|
||||||
[
|
|
||||||
"220 success" check-response
|
|
||||||
] with-log-stdio
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[ "220 success" ] [
|
[ "220 success" ] [
|
||||||
"220 success" [ receive-response ] string-in
|
"220 success" [ receive-response ] string-in
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "220 the end" ] [
|
[ "220 the end" ] [
|
||||||
[
|
"220-a multiline response\r\n250-another line\r\n220 the end"
|
||||||
"220-a multiline response\r\n250-another line\r\n220 the end"
|
[ receive-response ] string-in
|
||||||
[ receive-response ] string-in
|
|
||||||
] with-log-stdio
|
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
[
|
"220-a multiline response\r\n250-another line\r\n220 the end"
|
||||||
"220-a multiline response\r\n250-another line\r\n220 the end"
|
[ get-ok ] string-in
|
||||||
[ get-ok ] string-in
|
|
||||||
] with-log-stdio
|
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue