summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorChris Seaton <chris.seaton@shopify.com>2020-10-07 03:13:48 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-20 21:46:54 +0900
commit451836f5824fdf3c457ab8a5fd91d94cea91862e (patch)
treed9294bad337efb47a09f85317a5f517885a42997 /test/json
parent520e0916af0fe53a5ca57269a2bae50cc60e4241 (diff)
Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_generator_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 77b539dc3f..2ecdc97298 100644
--- a/test/json/json_generator_test.rb
+++ b/test/json/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)