Skip to content

Commit

Permalink
#869 Support for any-array placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed Dec 19, 2024
1 parent 6e49760 commit 9dbcd41
Show file tree
Hide file tree
Showing 2 changed files with 769 additions and 741 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class Diff {
private static final Pattern ANY_NUMBER_PLACEHOLDER = Pattern.compile("[$#]\\{json-unit.any-number\\}");
private static final Pattern ANY_BOOLEAN_PLACEHOLDER = Pattern.compile("[$#]\\{json-unit.any-boolean\\}");
private static final Pattern ANY_STRING_PLACEHOLDER = Pattern.compile("[$#]\\{json-unit.any-string\\}");
private static final Pattern ANY_ARRAY_PLACEHOLDER = Pattern.compile("[$#]\\{json-unit.any-array\\}");

private static final Pattern REGEX_PLACEHOLDER = Pattern.compile("[$#]\\{json-unit.regex\\}(.*)");
private static final Pattern MATCHER_PLACEHOLDER_PATTERN =
Expand Down Expand Up @@ -349,6 +350,11 @@ private void compareNodes(Context context) {
return;
}

// Any array
if (checkAny(NodeType.ARRAY, ANY_ARRAY_PLACEHOLDER, "an array", context)) {
return;
}

if (checkMatcher(context)) {
return;
}
Expand Down
Loading

0 comments on commit 9dbcd41

Please sign in to comment.