From 36684e920c0acfc4aeb3afd26db1a48561d57b11 Mon Sep 17 00:00:00 2001 From: DualFroz Date: Mon, 14 Sep 2026 04:42:07 +0200 Subject: [PATCH] add a test for update-assignment with overlapping paths into nested objects --- cli/test.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cli/test.yaml b/cli/test.yaml index 3b77647..a2ef24f 100644 --- a/cli/test.yaml +++ b/cli/test.yaml @@ -5510,6 +5510,14 @@ expected: | {"a":{"p":{"b":{"p":1,"q":1},"z":{"p":null,"q":null}},"q":{"b":{"p":1,"q":1}}}} +- name: update-assignment operator against nested object with overlapping paths + args: + - -c + - '(.a.b.c,.a,.a.p.b.z) |= {p: ., q: .}' + input: '{"a":{"b":{"c":1}}}' + expected: | + {"a":{"p":{"b":{"c":{"p":1,"q":1},"z":{"p":null,"q":null}}},"q":{"b":{"c":{"p":1,"q":1}}}}} + - name: update-assignment operator with optional operator args: - -c