From f9812984008622fc363c48297cf1a2ade9bcc616 Mon Sep 17 00:00:00 2001 From: Mirko Raner Date: Sun, 21 Jun 2026 16:23:25 -0700 Subject: [PATCH] Issue #255: made existing test case fail --- .../main/java/pro/projo/interfaces/annotation/Dtd.java | 7 ++++++- .../test/html/options/keywords/package-info.java | 6 +++++- .../html/options/keywords/expected/Textarea.kava | 1 + .../test/java/pro/projo/generation/dtd/DtdTestBase.java | 8 +++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/projo-template-annotation/src/main/java/pro/projo/interfaces/annotation/Dtd.java b/projo-template-annotation/src/main/java/pro/projo/interfaces/annotation/Dtd.java index 8f5408f..7eca393 100644 --- a/projo-template-annotation/src/main/java/pro/projo/interfaces/annotation/Dtd.java +++ b/projo-template-annotation/src/main/java/pro/projo/interfaces/annotation/Dtd.java @@ -1,5 +1,5 @@ // // -// Copyright 2022 - 2023 Mirko Raner // +// Copyright 2022 - 2026 Mirko Raner // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // @@ -112,6 +112,11 @@ **/ Alias[] aliases() default {}; + /** + * @return aliases for attributes (if any) + **/ + Alias[] attributeAliases() default {}; + /** * @return custom attributes for elements (if any) **/ diff --git a/projo-template-generation-test/src/main/java/pro/projo/generation/interfaces/test/html/options/keywords/package-info.java b/projo-template-generation-test/src/main/java/pro/projo/generation/interfaces/test/html/options/keywords/package-info.java index 4874692..393c0ef 100644 --- a/projo-template-generation-test/src/main/java/pro/projo/generation/interfaces/test/html/options/keywords/package-info.java +++ b/projo-template-generation-test/src/main/java/pro/projo/generation/interfaces/test/html/options/keywords/package-info.java @@ -1,5 +1,5 @@ // // -// Copyright 2023 Mirko Raner // +// Copyright 2023 - 2026 Mirko Raner // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // @@ -32,6 +32,10 @@ @Attribute(name="cols", type=BigInteger.class), @Attribute(name="class", type=ElementClass.class) }, + attributeAliases= + { + @Alias({"cols", "columns"}) + }, options=@Options ( fileExtension=".kava", diff --git a/projo-template-generation-test/src/test/resources/pro/projo/generation/interfaces/html/options/keywords/expected/Textarea.kava b/projo-template-generation-test/src/test/resources/pro/projo/generation/interfaces/html/options/keywords/expected/Textarea.kava index cdcf651..7292317 100644 --- a/projo-template-generation-test/src/test/resources/pro/projo/generation/interfaces/html/options/keywords/expected/Textarea.kava +++ b/projo-template-generation-test/src/test/resources/pro/projo/generation/interfaces/html/options/keywords/expected/Textarea.kava @@ -131,6 +131,7 @@ public interface Textarea Textarea autocomplete(String autocomplete); Textarea autofocus(String autofocus); Textarea cols(BigInteger cols); + Textarea columns(BigInteger cols); Textarea dirname(File dirname); Textarea disabled(String disabled); Textarea form(String form); diff --git a/projo-template-generation/src/test/java/pro/projo/generation/dtd/DtdTestBase.java b/projo-template-generation/src/test/java/pro/projo/generation/dtd/DtdTestBase.java index 82371c8..c6047e5 100644 --- a/projo-template-generation/src/test/java/pro/projo/generation/dtd/DtdTestBase.java +++ b/projo-template-generation/src/test/java/pro/projo/generation/dtd/DtdTestBase.java @@ -1,5 +1,5 @@ // // -// Copyright 2022 - 2023 Mirko Raner // +// Copyright 2022 - 2026 Mirko Raner // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // @@ -160,6 +160,12 @@ public Attribute[] attributes() return new Attribute[] {}; } + @Override + public Alias[] attributeAliases() + { + return new Alias[] {}; + } + @Override public int implicitTypeParameters() {