Skip to content

Commit

Permalink
fixed the definition of a spec
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@3091 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information
lrz committed Dec 9, 2009
1 parent 135c8a2 commit 511b7cc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/frozen/core/string/dump_spec.rb
Expand Up @@ -15,14 +15,14 @@
ruby_version_is "1.9" do
it "returns a string with nonprinting charaters replaced by \\x notation" do
("\000".."A").to_a.join('').should == "\x00\x01\x02\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\e\x1C\x1D\x1E\x1F !\"\#$%&'()*+,-./0123456789:;<=>?@A"
# This test is based on my observations; the precise workings of this
# feature are unknown to me
it "includes .force_encoding(name) if the encoding isn't ASCII compatiable" do
"\u{876}".encode('utf-16be').dump.should ==
"\"\\bv\".force_encoding(\"UTF-16BE\")"
"\u{876}".encode('utf-16le').dump.should ==
"\"v\\b\".force_encoding(\"UTF-16LE\")"
end
end
# This test is based on my observations; the precise workings of this
# feature are unknown to me
it "includes .force_encoding(name) if the encoding isn't ASCII compatiable" do
"\u{876}".encode('utf-16be').dump.should ==
"\"\\bv\".force_encoding(\"UTF-16BE\")"
"\u{876}".encode('utf-16le').dump.should ==
"\"v\\b\".force_encoding(\"UTF-16LE\")"
end
end

Expand Down

0 comments on commit 511b7cc

Please sign in to comment.