diff options
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_pair.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb index 5750f3b7df..d611d0f965 100644 --- a/test/openssl/test_pair.rb +++ b/test/openssl/test_pair.rb @@ -311,6 +311,17 @@ module OpenSSL::TestPairM } end + def test_write_zero + ssl_pair {|s1, s2| + assert_equal 0, s2.write_nonblock('', exception: false) + assert_kind_of Symbol, s1.read_nonblock(1, exception: false) + assert_equal 0, s2.syswrite('') + assert_kind_of Symbol, s1.read_nonblock(1, exception: false) + assert_equal 0, s2.write('') + assert_kind_of Symbol, s1.read_nonblock(1, exception: false) + } + end + def tcp_pair host = "127.0.0.1" serv = TCPServer.new(host, 0) |