sdmms1
3 years ago
committed by
GitHub
2 changed files with 47 additions and 0 deletions
@ -0,0 +1,32 @@
|
||||
package com.jayway.jsonpath.internal.function; |
||||
|
||||
import com.jayway.jsonpath.JsonPath; |
||||
import org.junit.Test; |
||||
|
||||
import java.io.IOException; |
||||
|
||||
import static org.junit.Assert.assertTrue; |
||||
|
||||
public class Issue629 { |
||||
@Test |
||||
public void testUncloseParenthesis() throws IOException { |
||||
try { |
||||
JsonPath jsonPath = JsonPath.compile("$.A.B.C.D("); |
||||
assert(false); |
||||
} |
||||
catch (Exception e) { |
||||
assertTrue(e.getMessage().startsWith("Arguments to function:")); |
||||
} |
||||
} |
||||
|
||||
@Test |
||||
public void testUncloseParenthesisWithNestedCall() throws IOException { |
||||
try { |
||||
JsonPath jsonPath = JsonPath.compile("$.A.B.C.sum(D()"); |
||||
assert(false); |
||||
} |
||||
catch (Exception e) { |
||||
assertTrue(e.getMessage().startsWith("Arguments to function:")); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue