1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_{string,symbol}.rb (test_ascii_incomat_inspect):

ASCII range characters are no longer escaped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-06-02 14:06:25 +00:00
parent 597d60f792
commit fabba1b93b
2 changed files with 4 additions and 2 deletions

View file

@ -1878,7 +1878,8 @@ class TestString < Test::Unit::TestCase
def test_ascii_incomat_inspect
[Encoding::UTF_16LE, Encoding::UTF_16BE,
Encoding::UTF_32LE, Encoding::UTF_32BE].each do |e|
assert_equal('"\\u0061\\u0062\\u0063"', "abc".encode(e).inspect)
assert_equal('"abc"', "abc".encode(e).inspect)
assert_equal('"\\u3042\\u3044\\u3046"', "\u3042\u3044\u3046".encode(e).inspect)
end
end
end

View file

@ -140,7 +140,8 @@ class TestSymbol < Test::Unit::TestCase
def test_ascii_incomat_inspect
[Encoding::UTF_16LE, Encoding::UTF_16BE,
Encoding::UTF_32LE, Encoding::UTF_32BE].each do |e|
assert_equal(':"\\u0061\\u0062\\u0063"', "abc".encode(e).to_sym.inspect)
assert_equal(':"abc"', "abc".encode(e).to_sym.inspect)
assert_equal(':"\\u3042\\u3044\\u3046"', "\u3042\u3044\u3046".encode(e).to_sym.inspect)
end
end
end