mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@3affe1e
This commit is contained in:
parent
6ae81d49b5
commit
45cf4f2187
277 changed files with 3844 additions and 7624 deletions
|
@ -31,16 +31,6 @@ describe "String#rjust with length, padding" do
|
|||
"radiology".rjust(8, '-').should == "radiology"
|
||||
end
|
||||
|
||||
ruby_version_is ''...'2.7' do
|
||||
it "taints result when self or padstr is tainted" do
|
||||
"x".taint.rjust(4).should.tainted?
|
||||
"x".taint.rjust(0).should.tainted?
|
||||
"".taint.rjust(0).should.tainted?
|
||||
"x".taint.rjust(4, "*").should.tainted?
|
||||
"x".rjust(4, "*".taint).should.tainted?
|
||||
end
|
||||
end
|
||||
|
||||
it "tries to convert length to an integer using to_int" do
|
||||
"^".rjust(3.8, "^_").should == "^_^"
|
||||
|
||||
|
@ -96,14 +86,6 @@ describe "String#rjust with length, padding" do
|
|||
end
|
||||
end
|
||||
|
||||
ruby_version_is ''...'2.7' do
|
||||
it "when padding is tainted and self is untainted returns a tainted string if and only if length is longer than self" do
|
||||
"hello".rjust(4, 'X'.taint).tainted?.should be_false
|
||||
"hello".rjust(5, 'X'.taint).tainted?.should be_false
|
||||
"hello".rjust(6, 'X'.taint).tainted?.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
describe "with width" do
|
||||
it "returns a String in the same encoding as the original" do
|
||||
str = "abc".force_encoding Encoding::IBM437
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue