db4
Slava Pestov 2008-05-18 17:18:28 -05:00
parent c01d5954e8
commit 78fb1a5022
3 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,6 @@
USING: arrays io io.files kernel math parser strings system USING: arrays io io.files kernel math parser strings system
tools.test words namespaces io.encodings.8-bit tools.test words namespaces io.encodings.8-bit
io.encodings.binary ; io.encodings.binary sequences ;
IN: io.tests IN: io.tests
[ f ] [ [ f ] [
@ -47,3 +47,11 @@ IN: io.tests
10 [ 65536 read drop ] times 10 [ 65536 read drop ] times
] with-file-reader ] with-file-reader
] unit-test ] unit-test
! Test EOF behavior
[ 10 ] [
image binary [
0 read drop
10 read length
] with-file-reader
] unit-test

View File

@ -110,7 +110,7 @@ HOOK: (wait-to-write) io-backend ( port -- )
M: output-port stream-flush ( port -- ) M: output-port stream-flush ( port -- )
[ check-disposed ] [ port-flush ] bi ; [ check-disposed ] [ port-flush ] bi ;
M: output-port dispose M: output-port dispose*
[ port-flush ] [ call-next-method ] bi ; [ port-flush ] [ call-next-method ] bi ;
M: buffered-port dispose* M: buffered-port dispose*

View File

@ -56,11 +56,11 @@ concurrency.promises byte-arrays ;
! ] "SSL server test" spawn drop ! ] "SSL server test" spawn drop
! ] unit-test ! ] unit-test
[ ! [
<secure-config> [ ! <secure-config> [
"127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop contents ! "127.0.0.1" "port" get ?promise <inet4> <secure> ascii <client> drop contents
] with-secure-context ! ] with-secure-context
] [ premature-close = ] must-fail-with ! ] [ \ premature-close = ] must-fail-with
! Now, try validating the certificate. This should fail because its ! Now, try validating the certificate. This should fail because its
! actually an invalid certificate ! actually an invalid certificate