This is an automated email from the ASF dual-hosted git repository. sjaranowski pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-shade-plugin.git
The following commit(s) were added to refs/heads/master by this push: new 437eff9 Add test cases for .md supports in the Apache License and Notice transformers 437eff9 is described below commit 437eff918fa31d7461290dd20bad79eee975b686 Author: Zongle Wang <wangzong...@gmail.com> AuthorDate: Mon Nov 25 22:03:12 2024 +0800 Add test cases for .md supports in the Apache License and Notice transformers A small check for ba0cc3c317cd3545a5634339c6cd1bfc2491dd52. --- .../shade/resource/ApacheLicenseResourceTransformerTest.java | 1 + .../ApacheNoticeResourceTransformerParameterTests.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/test/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformerTest.java b/src/test/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformerTest.java index 6dd9e2a..468a926 100644 --- a/src/test/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformerTest.java +++ b/src/test/java/org/apache/maven/plugins/shade/resource/ApacheLicenseResourceTransformerTest.java @@ -54,6 +54,7 @@ public class ApacheLicenseResourceTransformerTest { assertTrue(transformer.canTransformResource("META-INF/LICENSE.TXT")); assertTrue(transformer.canTransformResource("META-INF/LICENSE.md")); assertTrue(transformer.canTransformResource("META-INF/License.txt")); + assertTrue(transformer.canTransformResource("META-INF/License.md")); assertFalse(transformer.canTransformResource("META-INF/MANIFEST.MF")); } } diff --git a/src/test/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformerParameterTests.java b/src/test/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformerParameterTests.java index cd61ca3..32f6cf1 100644 --- a/src/test/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformerParameterTests.java +++ b/src/test/java/org/apache/maven/plugins/shade/resource/ApacheNoticeResourceTransformerParameterTests.java @@ -27,6 +27,7 @@ import org.apache.maven.plugins.shade.relocation.Relocator; import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** @@ -42,6 +43,15 @@ public class ApacheNoticeResourceTransformerParameterTests { subject = new ApacheNoticeResourceTransformer(); } + @Test + public void testCanTransformResource() { + assertTrue(subject.canTransformResource("META-INF/NOTICE")); + assertTrue(subject.canTransformResource("META-INF/NOTICE.TXT")); + assertTrue(subject.canTransformResource("META-INF/NOTICE.md")); + assertTrue(subject.canTransformResource("META-INF/Notice.txt")); + assertTrue(subject.canTransformResource("META-INF/Notice.md")); + } + @Test public void testNoParametersShouldNotThrowNullPointerWhenNoInput() throws IOException { processAndFailOnNullPointer("");