]> granicus.if.org Git - jq/commitdiff
One more recursive merge test
authorNicolas Williams <nico@cryptonector.com>
Thu, 13 Mar 2014 04:44:21 +0000 (23:44 -0500)
committerNicolas Williams <nico@cryptonector.com>
Thu, 13 Mar 2014 04:44:21 +0000 (23:44 -0500)
tests/all.test

index ff7245be7bfe193c9526dce811172e379a5d84d3..9c244d54a1ba198ed18e206d6af341bf379212c0 100644 (file)
@@ -780,6 +780,8 @@ map([1,2][0:.])
 [-1, 1, 2, 3, 1000000000000000000]
 [[1], [1], [1,2], [1,2], [1,2]]
 
+# Test recursive object merge
+
 {"k": {"a": 1, "b": 2}} * .
 {"k": {"a": 0,"c": 3}}
 {"k": {"a": 0, "b": 2, "c": 3}}
@@ -791,3 +793,7 @@ map([1,2][0:.])
 {"k": {"a": 1, "b": 2}, "hello": 1} * .
 {"k": {"a": 0,"c": 3}, "hello": {"x": 1}}
 {"k": {"a": 0, "b": 2, "c": 3}, "hello": {"x": 1}}
+
+{"a": {"b": 1}, "c": {"d": 2}, "e": 5} * .
+{"a": {"b": 2}, "c": {"d": 3, "f": 9}}
+{"a": {"b": 2}, "c": {"d": 3, "f": 9}, "e": 5}