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
|
@ -22,15 +22,13 @@ describe "MatchData#post_match" do
|
|||
$'.untrusted?.should be_true
|
||||
end
|
||||
|
||||
with_feature :encoding do
|
||||
it "sets the encoding to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::EUC_JP
|
||||
str.match(/b/).post_match.encoding.should equal(Encoding::EUC_JP)
|
||||
end
|
||||
it "sets the encoding to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::EUC_JP
|
||||
str.match(/b/).post_match.encoding.should equal(Encoding::EUC_JP)
|
||||
end
|
||||
|
||||
it "sets an empty result to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::ISO_8859_1
|
||||
str.match(/c/).post_match.encoding.should equal(Encoding::ISO_8859_1)
|
||||
end
|
||||
it "sets an empty result to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::ISO_8859_1
|
||||
str.match(/c/).post_match.encoding.should equal(Encoding::ISO_8859_1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,15 +22,13 @@ describe "MatchData#pre_match" do
|
|||
$`.untrusted?.should be_true
|
||||
end
|
||||
|
||||
with_feature :encoding do
|
||||
it "sets the encoding to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::EUC_JP
|
||||
str.match(/b/).pre_match.encoding.should equal(Encoding::EUC_JP)
|
||||
end
|
||||
it "sets the encoding to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::EUC_JP
|
||||
str.match(/b/).pre_match.encoding.should equal(Encoding::EUC_JP)
|
||||
end
|
||||
|
||||
it "sets an empty result to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::ISO_8859_1
|
||||
str.match(/a/).pre_match.encoding.should equal(Encoding::ISO_8859_1)
|
||||
end
|
||||
it "sets an empty result to the encoding of the source String" do
|
||||
str = "abc".force_encoding Encoding::ISO_8859_1
|
||||
str.match(/a/).pre_match.encoding.should equal(Encoding::ISO_8859_1)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue