Add support for "<<" anchor references in application.yml

This commit is contained in:
Kris De Volder
2020-03-31 16:12:13 -07:00
parent 4e29c9d4c3
commit 17af13e448
5 changed files with 57 additions and 24 deletions

View File

@@ -89,7 +89,33 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
////////////////////////////////////////////////////////////////////////////////////////
@Test public void GH_404_ConsutructorBinding_support() throws Exception {
@Test public void GH_420_anchorReference() throws Exception {
Editor editor;
data("config.bob", "java.lang.String", null, null);
data("config.dude", "java.lang.String", null, null);
editor = newEditor(
"configref: &config\n" +
" bob: bob\n" +
" asdf: dude\n" +
"config:\n" +
" <<: *config"
);
editor.assertProblems("asdf|Unknown");
editor = newEditor(
"configref: &config\n" +
" bob: bob\n" +
" asdf: dude\n" +
"config: *config"
);
editor.assertProblems(
"asdf|Unknown"
);
}
@Test public void GH_404_ConstructorBinding_support() throws Exception {
useProject(createPredefinedMavenProject("gh_404"));
Editor editor;