aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json/encoding_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-25 12:09:13 +0100
committerJosé Valim <jose.valim@gmail.com>2009-12-25 12:09:13 +0100
commiteb8e627c6918dae53c7ab8b9208e72ff64d20348 (patch)
tree4f153960d158c119ebdcef7a3a02c407e4b82dd0 /activesupport/test/json/encoding_test.rb
parent4b8330d2d50ae4de14dd43ffbea4d91804553140 (diff)
parent1c66f85eb6cd80053cf60889634a8c39c21b11a1 (diff)
downloadrails-eb8e627c6918dae53c7ab8b9208e72ff64d20348.tar.gz
rails-eb8e627c6918dae53c7ab8b9208e72ff64d20348.tar.bz2
rails-eb8e627c6918dae53c7ab8b9208e72ff64d20348.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activesupport/test/json/encoding_test.rb')
-rw-r--r--activesupport/test/json/encoding_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index 5d81d09f03..cf9a635b5f 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -23,7 +23,9 @@ class TestJSONEncoding < Test::Unit::TestCase
StringTests = [[ 'this is the <string>', %("this is the \\u003Cstring\\u003E")],
[ 'a "string" with quotes & an ampersand', %("a \\"string\\" with quotes \\u0026 an ampersand") ],
- [ 'http://test.host/posts/1', %("http://test.host/posts/1")]]
+ [ 'http://test.host/posts/1', %("http://test.host/posts/1")],
+ [ "Control characters: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
+ %("Control characters: \\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\t\\n\\u000B\\f\\r\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F") ]]
ArrayTests = [[ ['a', 'b', 'c'], %([\"a\",\"b\",\"c\"]) ],
[ [1, 'a', :b, nil, false], %([1,\"a\",\"b\",null,false]) ]]