File tree Expand file tree Collapse file tree
core/src/main/kotlin/org/evomaster/core/output/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,7 +275,8 @@ abstract class ApiTestCaseWriter : TestCaseWriter() {
275275 TODO should do check for when there are spaces in the field name
276276 TODO also need more tests to check all these edge cases
277277 */
278- format.isJavaOrKotlin() -> if (fieldPath.isEmpty()) " " else if (fieldPath.startsWith(" '" )) " $fieldPath ." else " '$fieldPath '."
278+ // field path starts with [ is an array index, do not need additional quote
279+ format.isJavaOrKotlin() -> if (fieldPath.isEmpty()) " " else if (fieldPath.startsWith(" '" ) || fieldPath.startsWith(" [" )) " $fieldPath ." else " '$fieldPath '."
279280 format.isJavaScript() -> if (fieldPath.isEmpty()) " " else " ${if (fieldPath.startsWith(" [" ) || fieldPath.startsWith(" ." )) " " else " ." }$fieldPath "
280281 format.isCsharp() -> if (fieldPath.isEmpty()) " " else " ${if (fieldPath.startsWith(" [" )) " " else " ." }$fieldPath "
281282 format.isPython() -> if (fieldPath.isEmpty()) " " else " ${if (fieldPath.startsWith(" [" ) || fieldPath.startsWith(" ." )) " " else " ." }$fieldPath "
You can’t perform that action at this time.
0 commit comments