summaryrefslogtreecommitdiff
path: root/test/openssl/test_ssl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/openssl/test_ssl.rb')
-rw-r--r--test/openssl/test_ssl.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index f24aabe748..3dda754870 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -185,6 +185,19 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
}
end
+ def test_getbyte
+ start_server { |port|
+ server_connect(port) { |ssl|
+ str = +("x" * 100 + "\n")
+ ssl.syswrite(str)
+ newstr = str.bytesize.times.map { |i|
+ ssl.getbyte
+ }.pack("C*")
+ assert_equal(str, newstr)
+ }
+ }
+ end
+
def test_sync_close
start_server do |port|
begin