add a test for update-assignment with overlapping paths into nested objects

This commit is contained in:
dualfroz committed 2026-09-14 04:42:07 +02:00
1 parent 1c66c26e03
commit 36684e920c
1 file changed
+8
+8
View File
@@ -5510,6 +5510,14 @@
expected: | expected: |
{"a":{"p":{"b":{"p":1,"q":1},"z":{"p":null,"q":null}},"q":{"b":{"p":1,"q":1}}}} {"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 - name: update-assignment operator with optional operator
args: args:
- -c - -c