mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@b0b7f53
This commit is contained in:
parent
acbe7aa197
commit
6d05967468
27 changed files with 703 additions and 76 deletions
|
@ -55,6 +55,10 @@ describe "String#chomp" do
|
|||
$/ = "cdef"
|
||||
"abcdef".chomp.should == "ab"
|
||||
end
|
||||
|
||||
it "removes one trailing newline for string with invalid encoding" do
|
||||
"\xa0\xa1\n".chomp.should == "\xa0\xa1"
|
||||
end
|
||||
end
|
||||
|
||||
describe "when passed nil" do
|
||||
|
@ -108,6 +112,10 @@ describe "String#chomp" do
|
|||
it "returns an empty String when self is empty" do
|
||||
"".chomp("").should == ""
|
||||
end
|
||||
|
||||
it "removes one trailing newline for string with invalid encoding" do
|
||||
"\xa0\xa1\n".chomp("").should == "\xa0\xa1"
|
||||
end
|
||||
end
|
||||
|
||||
describe "when passed '\\n'" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue