From 8df4507e9c0db57df068c5f7b55548c95aea73eb Mon Sep 17 00:00:00 2001 From: abhishek kumar tiwari Date: Mon, 29 Jan 2024 16:18:36 +0530 Subject: [PATCH] Add test for fixing parsing login when path has a function as argument to another function Add test for fixing parsing login when path has a function as argument to another function --- .../test/java/com/jayway/jsonpath/PathCompilerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/json-path/src/test/java/com/jayway/jsonpath/PathCompilerTest.java b/json-path/src/test/java/com/jayway/jsonpath/PathCompilerTest.java index ef220619..419b9bc1 100644 --- a/json-path/src/test/java/com/jayway/jsonpath/PathCompilerTest.java +++ b/json-path/src/test/java/com/jayway/jsonpath/PathCompilerTest.java @@ -323,4 +323,11 @@ public class PathCompilerTest { public void property_must_be_separated_by_commas() { compile("$['aaa'}'bbb']"); } + + @Test + public void function_parameter_with_closing_paren() { + String json = "{}"; + String result = JsonPath.read(json, "$.concat(\"Bob\", $.concat(\" Joe\", \" Alex\"))"); + assertThat(result).isEqualTo("Bob Joe Alex"); + } }