mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@7de852d
This commit is contained in:
parent
994833085a
commit
79671ec57e
135 changed files with 4415 additions and 4885 deletions
|
@ -17,13 +17,11 @@ describe "String#byteslice with Range" do
|
|||
it_behaves_like :string_slice_range, :byteslice
|
||||
end
|
||||
|
||||
with_feature :encoding do
|
||||
describe "String#byteslice on on non ASCII strings" do
|
||||
it "returns byteslice of unicode strings" do
|
||||
"\u3042".byteslice(1).should == "\x81".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(1, 2).should == "\x81\x82".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(1..2).should == "\x81\x82".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(-1).should == "\x82".force_encoding("UTF-8")
|
||||
end
|
||||
describe "String#byteslice on on non ASCII strings" do
|
||||
it "returns byteslice of unicode strings" do
|
||||
"\u3042".byteslice(1).should == "\x81".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(1, 2).should == "\x81\x82".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(1..2).should == "\x81\x82".force_encoding("UTF-8")
|
||||
"\u3042".byteslice(-1).should == "\x82".force_encoding("UTF-8")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue