From 9ecb076769a41a1b0c0abd51e223d21b52341189 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 22 Aug 2026 16:44:44 +0200 Subject: [PATCH] Add a jupiter-tests target to run JUnit 5 tests The junit task cannot run Jupiter tests, so there is nowhere to put one today. This adds a junitlauncher target beside the existing run and a selector naming the JUnit 5 tests, used by both so the two runners cannot pick up the same class. UnicodeUtilTest moves across as the first one, to prove the target runs. Reports go to their own directory; junitreport still aggregates only the junit task's XML, so nothing about the existing reporting changes. --- build.xml | 45 ++++++++++++++++++- .../tools/ant/util/UnicodeUtilTest.java | 4 +- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 0f00e70612..1a904dd4e0 100644 --- a/build.xml +++ b/build.xml @@ -85,6 +85,7 @@ + @@ -239,6 +240,14 @@ + + + + + + + @@ -1916,7 +1925,36 @@ ${antunit.reports} - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1983,6 +2021,11 @@ ${antunit.reports} + + + + + diff --git a/src/tests/junit/org/apache/tools/ant/util/UnicodeUtilTest.java b/src/tests/junit/org/apache/tools/ant/util/UnicodeUtilTest.java index 59b9136629..a3d6beef64 100644 --- a/src/tests/junit/org/apache/tools/ant/util/UnicodeUtilTest.java +++ b/src/tests/junit/org/apache/tools/ant/util/UnicodeUtilTest.java @@ -17,9 +17,9 @@ */ package org.apache.tools.ant.util; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class UnicodeUtilTest {