diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-02-16 15:21:29 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-16 15:21:29 +0900 |
commit | b99775b163ce44079c1f8727ce9b4ed8bb03489d (patch) | |
tree | 4f9fd53f21c94dfeb05fefe1143bbe770228733a /test/openssl/test_buffering.rb | |
parent | 0bfa479c52963b95a47ceab3d453f21b646366a2 (diff) |
Import openssl-2.2.0 (#2693)
Import the master branch of ruby/openssl for preparing to release openssl-2.2.0
Notes
Notes:
Merged-By: hsbt <[email protected]>
Diffstat (limited to 'test/openssl/test_buffering.rb')
-rw-r--r-- | test/openssl/test_buffering.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/openssl/test_buffering.rb b/test/openssl/test_buffering.rb index c85a6f020b..7575c5b4fe 100644 --- a/test/openssl/test_buffering.rb +++ b/test/openssl/test_buffering.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require_relative 'utils' if defined?(OpenSSL) @@ -10,7 +10,7 @@ class OpenSSL::TestBuffering < OpenSSL::TestCase attr_accessor :sync def initialize - @io = "" + @io = Buffer.new def @io.sync true end @@ -41,6 +41,13 @@ class OpenSSL::TestBuffering < OpenSSL::TestCase @io = IO.new end + def test_encoding + @io.write '😊' + @io.flush + + assert_equal @io.string.encoding, Encoding::BINARY + end + def test_flush @io.write 'a' |