diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-10-20 21:33:52 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 21:33:52 +0900 |
commit | 01e4823ee1b9837d7289ae4eb35c9d74535e0f5e (patch) | |
tree | fba7e360e7768522e7569a7c07bee4c72e6bfc50 /tests/json_generator_test.rb | |
parent | 07c34048ff758c81be9d8b30f5d63084e5e9e072 (diff) | |
parent | b8c1c640cd375f2e2ccca1b18bf943f80ad04816 (diff) | |
download | json-01e4823ee1b9837d7289ae4eb35c9d74535e0f5e.tar.gz |
Merge pull request #449 from chrisseaton/pretty-empty
Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations
Diffstat (limited to 'tests/json_generator_test.rb')
-rwxr-xr-x | tests/json_generator_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/json_generator_test.rb b/tests/json_generator_test.rb index 77b539d..2ecdc97 100755 --- a/tests/json_generator_test.rb +++ b/tests/json_generator_test.rb @@ -92,6 +92,11 @@ EOT end def test_generate_pretty + json = pretty_generate({}) + assert_equal(<<'EOT'.chomp, json) +{ +} +EOT json = pretty_generate(@hash) # hashes aren't (insertion) ordered on every ruby implementation # assert_equal(@json3, json) |