Open TobiasNx opened 2 years ago
{ "a": ["b", "c", "d"], "w": "e", "z": [] }
fix:
copy_field("a[]", "z[].$append") copy_field("a[].*", "z[].$append") copy_field("w", "z[].$append")
result:
{ "a" : [ "b", "c", "d" ], "w" : "e", "z" : [ "b", "c", "d", "b", "c", "d", "e" ] }
expected:
{ "a" : [ "b", "c", "d" ], "w" : "e", "z" : [ ["b", "c", "d"], "b", "c", "d", "e" ] }
copy_field("a[]", "z[].$append") without * operates exactly as copy_field("a[].*", "z[].$append")
copy_field("a[]", "z[].$append")
*
copy_field("a[].*", "z[].$append")
This is in my opinion wrong. I will build a test for that later.
Revisit / add as unit test after https://github.com/metafacture/metafacture-fix/issues/102.
Integration tests:
fix:
result:
expected:
copy_field("a[]", "z[].$append")
without*
operates exactly ascopy_field("a[].*", "z[].$append")
This is in my opinion wrong. I will build a test for that later.