diff --git a/core/io/io-tests.factor b/core/io/io-tests.factor index 50a798d290..af40cf8737 100755 --- a/core/io/io-tests.factor +++ b/core/io/io-tests.factor @@ -1,6 +1,6 @@ USING: arrays io io.files kernel math parser strings system tools.test words namespaces io.encodings.8-bit -io.encodings.binary ; +io.encodings.binary sequences ; IN: io.tests [ f ] [ @@ -47,3 +47,11 @@ IN: io.tests 10 [ 65536 read drop ] times ] with-file-reader ] unit-test + +! Test EOF behavior +[ 10 ] [ + image binary [ + 0 read drop + 10 read length + ] with-file-reader +] unit-test diff --git a/extra/io/ports/ports.factor b/extra/io/ports/ports.factor index 128a8b788b..043644bb45 100755 --- a/extra/io/ports/ports.factor +++ b/extra/io/ports/ports.factor @@ -110,7 +110,7 @@ HOOK: (wait-to-write) io-backend ( port -- ) M: output-port stream-flush ( port -- ) [ check-disposed ] [ port-flush ] bi ; -M: output-port dispose +M: output-port dispose* [ port-flush ] [ call-next-method ] bi ; M: buffered-port dispose* diff --git a/extra/io/unix/sockets/secure/secure-tests.factor b/extra/io/unix/sockets/secure/secure-tests.factor index c5ef0db2f8..f05b4edbde 100644 --- a/extra/io/unix/sockets/secure/secure-tests.factor +++ b/extra/io/unix/sockets/secure/secure-tests.factor @@ -56,11 +56,11 @@ concurrency.promises byte-arrays ; ! ] "SSL server test" spawn drop ! ] unit-test -[ - [ - "127.0.0.1" "port" get ?promise ascii drop contents - ] with-secure-context -] [ premature-close = ] must-fail-with +! [ +! [ +! "127.0.0.1" "port" get ?promise ascii drop contents +! ] with-secure-context +! ] [ \ premature-close = ] must-fail-with ! Now, try validating the certificate. This should fail because its ! actually an invalid certificate