Skip to content

Commit

Permalink
Failing spec for String#encode with Emacs-Mule.
Browse files Browse the repository at this point in the history
See rspec/rspec-support#163 for the background story.
  • Loading branch information
Yorick Peterse committed Jan 31, 2015
1 parent 2b0936a commit aac96d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/ruby/core/string/shared/encode.rb
Expand Up @@ -100,6 +100,12 @@
str.send(@method, :invalid => :replace, :undef => :replace)
end.should raise_error(Encoding::ConverterNotFoundError)
end

it "replaces invalid characters when replacing Emacs-Mule encoded strings" do
got = "\x80".force_encoding('Emacs-Mule').send(@method, :invalid => :replace)

got.should == "?".encode('Emacs-Mule')
end
end

describe "when passed to, from" do
Expand Down
2 changes: 2 additions & 0 deletions spec/tags/ruby/core/string/encode_tags.txt
Expand Up @@ -2,3 +2,5 @@ fails:String#encode given the :xml => :text option replaces undefined characters
fails:String#encode given the :xml => :attr option replaces undefined characters with their upper-case hexadecimal numeric character references
fails:String#encode! given the :xml => :text option replaces undefined characters with their upper-case hexadecimal numeric character references
fails:String#encode! given the :xml => :attr option replaces undefined characters with their upper-case hexadecimal numeric character references
fails:String#encode when passed options replaces invalid characters when replacing Emacs-Mule encoded strings
fails:String#encode! when passed options replaces invalid characters when replacing Emacs-Mule encoded strings

0 comments on commit aac96d1

Please sign in to comment.