зеркало из https://github.com/github/ruby.git
* test/psych/json/test_stream.rb (Psych::JSON::TestStream::test_list_to_json):
escape `]`. * test/psych/test_json_tree.rb (Psych::JSON::TestJSONTree#test_list_to_json): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9d38d655e6
Коммит
37d0c509b7
|
@ -65,7 +65,7 @@ module Psych
|
|||
@stream.push list
|
||||
|
||||
json = @io.string
|
||||
assert_match(/]$/, json)
|
||||
assert_match(/\]$/, json)
|
||||
assert_match(/^--- \[/, json)
|
||||
assert_match(/["]one["]/, json)
|
||||
assert_match(/["]two["]/, json)
|
||||
|
|
|
@ -45,7 +45,7 @@ module Psych
|
|||
def test_list_to_json
|
||||
list = %w{ one two }
|
||||
json = Psych.to_json(list)
|
||||
assert_match(/]$/, json)
|
||||
assert_match(/\]$/, json)
|
||||
assert_match(/^\[/, json)
|
||||
assert_match(/"one"/, json)
|
||||
assert_match(/"two"/, json)
|
||||
|
|
Загрузка…
Ссылка в новой задаче