Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

append/prepend with $first/$last Wildcard-Array does not work #144

Closed
TobiasNx opened this issue Feb 11, 2022 · 3 comments · Fixed by #214
Closed

append/prepend with $first/$last Wildcard-Array does not work #144

TobiasNx opened this issue Feb 11, 2022 · 3 comments · Fixed by #214
Labels
Bug Something isn't working

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Feb 11, 2022

https://github.com/TobiasNx/fix-FunctionalReview-Testing/blob/fed2b347bd9828a29ce6ca4fa067fcefb8868ae9/data/testing/append_prepend_last

set_array("test[]")
set_array("test_2[]")
add_field("test[].$append.test","World")
prepend("test[].$last.test","Hello ")
add_field("test_2[].$append.test","foo")
append("test_2[].$last.test"," bar")

expected:

{
    "string" : "string",
    "test" : [ {
      "test" : "Hello World"
    } ],
    "test_2" : [ {
      "test" : "foo bar"
    } ]
  }

is:

{
  "string" : "string",
  "test" : [ {
    "test" : "World"
  } ],
  "test_2" : [ {
    "test" : "foo"
  } ]
}
@TobiasNx
Copy link
Collaborator Author

set_array("test[]")
set_array("test_2[]")
add_field("test[].$append.test","World")
prepend("test[].*.test","Hello ")
add_field("test_2[].$append.test","foo")
append("test_2[].*.test"," bar")

works

@TobiasNx TobiasNx added the Bug Something isn't working label Feb 11, 2022
@fsteeg
Copy link
Member

fsteeg commented Feb 21, 2022

Add as integration test in #160 / revisit after #102.

@fsteeg fsteeg moved this to Backlog in Metafacture Feb 21, 2022
TobiasNx added a commit that referenced this issue Mar 1, 2022
@TobiasNx TobiasNx changed the title append/prepend with Wildcard-Array does not work append/prepend with $first/$last Wildcard-Array does not work Mar 1, 2022
TobiasNx added a commit that referenced this issue Mar 1, 2022
@TobiasNx
Copy link
Collaborator Author

This seems to be the case with replace_all too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants