diff options
author | Benoit Daloze <eregontp@gmail.com> | 2022-07-27 17:18:25 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2022-07-27 17:18:25 +0200 |
commit | 6582df26dcdef5dab01242b4d97d9b242e959860 (patch) | |
tree | 99824a5c370ef27acd12905b67304870f1af9561 /spec/ruby/library/stringio/shared/read.rb | |
parent | 44f42413e6c3c2b487a03b53bf6cacbb83ac285b (diff) |
Update to ruby/spec@cbfaf51
Diffstat (limited to 'spec/ruby/library/stringio/shared/read.rb')
-rw-r--r-- | spec/ruby/library/stringio/shared/read.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/shared/read.rb b/spec/ruby/library/stringio/shared/read.rb index c60677bba7..252a85d89d 100644 --- a/spec/ruby/library/stringio/shared/read.rb +++ b/spec/ruby/library/stringio/shared/read.rb @@ -89,6 +89,12 @@ describe :stringio_read_no_arguments, shared: true do @io.send(@method) @io.pos.should eql(7) end + + it "correctly update the current position in bytes when multi-byte characters are used" do + @io.print("example\u03A3") # Overwrite the original string with 8 characters containing 9 bytes. + @io.send(@method) + @io.pos.should eql(9) + end end describe :stringio_read_nil, shared: true do |