Fix YAML structure for escaped keys

This commit is contained in:
aboyko
2024-05-15 15:22:14 -04:00
parent 0300cded42
commit 212dacff69
3 changed files with 57 additions and 1 deletions

View File

@@ -2582,6 +2582,29 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
"monday : String", "tuesday : String", "wednesday : String", "thursday : String", "friday : String", "saturday : String", "sunday : String"
);
}
@Test
void testValueCompletionsOnEscapedKey() throws Exception {
useProject(createPredefinedMavenProject("enums-boot-1.3.2-app"));
data("foo.demo", "java.util.Map<java.lang.String,demo.Color>", null, "Map of any string to colors");
assertCompletions(
"foo:\n" +
" demo:\n" +
" '[./**/]': <*>",
//=>
"foo:\n" +
" demo:\n" +
" '[./**/]': blue<*>",
"foo:\n" +
" demo:\n" +
" '[./**/]': green<*>",
"foo:\n" +
" demo:\n" +
" '[./**/]': red<*>"
);
}
@Test
void testEnumMapKeyCompletion() throws Exception {