From: Nicolas Williams Date: Thu, 13 Mar 2014 04:44:21 +0000 (-0500) Subject: One more recursive merge test X-Git-Tag: jq-1.4~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4402c6d806ec0a7dfc027d4e735d0c82f9531da5;p=jq One more recursive merge test --- diff --git a/tests/all.test b/tests/all.test index ff7245b..9c244d5 100644 --- a/tests/all.test +++ b/tests/all.test @@ -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}