aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-11-13 16:19:45 +0900
committerGitHub <noreply@github.com>2017-11-13 16:19:45 +0900
commitbd6add3808b6e93043b8adb9ab3866b86f8c58c5 (patch)
tree1255d5fecccbb31ad0361f8df11198d2fdc68a0c /test
parent37106e3b97fcdab7df8cbd9d092d1cc1388506ee (diff)
parentcfa154fa577d4e4d0f551b1b3ed9502d24963ec0 (diff)
downloadruby-openssl-bd6add3808b6e93043b8adb9ab3866b86f8c58c5.tar.gz
Merge pull request #162 from rhenium/ky/ssl-write-multi
buffering: let #write accept multiple arguments
Diffstat (limited to 'test')
-rw-r--r--test/test_pair.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_pair.rb b/test/test_pair.rb
index 55b62321..29d5c9bb 100644
--- a/test/test_pair.rb
+++ b/test/test_pair.rb
@@ -362,6 +362,15 @@ module OpenSSL::TestPairM
}
end
+ def test_write_multiple_arguments
+ ssl_pair {|s1, s2|
+ str1 = "foo"; str2 = "bar"
+ assert_equal 6, s1.write(str1, str2)
+ s1.close
+ assert_equal "foobar", s2.read
+ }
+ end
+
def test_partial_tls_record_read_nonblock
ssl_pair { |s1, s2|
# the beginning of a TLS record