Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Update test function append & prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Jan 25, 2022
1 parent 7a3023e commit 4530b97
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 5 deletions.
14 changes: 13 additions & 1 deletion data/review/append/animals_complex.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,17 @@
"name": "bird",
"type": "TEST"
},
"ANIMALS": ["dog", "cat", "zebra"]
"ANIMALS": ["dog", "cat", "zebra"],
"others": [
{
"name": "Jake",
"animal": "dog"
}
],
"OTHERS": [
{
"name": "Jake",
"animal": "dog"
}
]
}
3 changes: 3 additions & 0 deletions data/review/append/append.fix
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ append("animals[].1", " is cool")

append("bnimals[].*", " is cool")

append("others[].1.animal", " is cool")
append("OTHERS[].*.animal", " is cool")

# This results in error:
# append("ANIMALS[]", " is cool")
10 changes: 9 additions & 1 deletion data/review/append/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
"name": "bird boss",
"type": "TEST"
},
"ANIMALS": ["dog", "cat", "zebra"]
"ANIMALS": ["dog", "cat", "zebra"],
"others" : [ {
"name" : "Jake",
"animal" : "dog is cool"
} ],
"OTHERS" : [ {
"name" : "Jake",
"animal" : "dog is cool"
} ]
}
8 changes: 8 additions & 0 deletions data/review/append/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
"name" : "bird boss"
},
"ANIMALS" : [ "dog", "cat", "zebra" ],
"others" : [ {
"name" : "Jake",
"animal" : "dog is cool"
} ],
"OTHERS" : [ {
"name" : "Jake",
"animal" : "dog is cool"
} ],
"animal" : "bunny is cool"
}
14 changes: 13 additions & 1 deletion data/review/prepend/animals_complex.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,17 @@
"name": "bird",
"type": "TEST"
},
"ANIMALS": ["dog", "cat", "zebra"]
"ANIMALS": ["dog", "cat", "zebra"],
"others": [
{
"name": "Jake",
"animal": "dog"
}
],
"OTHERS": [
{
"name": "Jake",
"animal": "dog"
}
]
}
11 changes: 9 additions & 2 deletions data/review/prepend/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"type" : "TEST",
"name" : "Boss bird"
},
"ANIMALS": ["dog", "cat", "zebra"]

"ANIMALS": ["dog", "cat", "zebra"],
"others" : [ {
"animal" : "dog",
"name" : "Hello Jake"
} ],
"OTHERS" : [ {
"animal" : "dog",
"name" : "Hi Jake"
} ]
}
4 changes: 4 additions & 0 deletions data/review/prepend/prepend.fix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ prepend("animals[].1", "Yeah ")

prepend("bnimals[].*", "Muh ")

prepend("others[].1.name", "Hello ")

prepend("OTHERS[].*.name", "Hi ")

# This results in error as expected:
# prepend("ANIMALS[]", "Hmmm ")
8 changes: 8 additions & 0 deletions data/review/prepend/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
"name" : "Boss bird"
},
"ANIMALS" : [ "dog", "cat", "zebra" ],
"others" : [ {
"animal" : "dog",
"name" : "Hello Jake"
} ],
"OTHERS" : [ {
"animal" : "dog",
"name" : "Hi Jake"
} ],
"animal" : "What a nice bunny"
}

0 comments on commit 4530b97

Please sign in to comment.