This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch 1546-1222
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/1546-1222 by this push:
new bfe9745 display name in TEST-*.txt and encoding in IT
bfe9745 is described below
commit bfe9745a4e181101721e37148e341b7b54dac121
Author: tibordigana <[email protected]>
AuthorDate: Thu Apr 4 06:05:40 2019 +0200
display name in TEST-*.txt and encoding in IT
---
.../apache/maven/plugin/surefire/report/FileReporter.java | 2 +-
.../java/org/apache/maven/surefire/its/JUnitPlatformIT.java | 12 +++++++-----
.../src/test/resources/junit-platform-engine-jupiter/pom.xml | 1 +
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java
index 941b88a..9571f87 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/FileReporter.java
@@ -74,7 +74,7 @@ public class FileReporter
writer.write(
"-------------------------------------------------------------------------------"
);
writer.newLine();
- writer.write( "Test set: " + report.getSourceName() );
+ writer.write( "Test set: " + report.getReportSourceName() );
writer.newLine();
writer.write(
"-------------------------------------------------------------------------------"
);
diff --git
a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformIT.java
b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformIT.java
index aeeb15a..73f3748 100644
---
a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformIT.java
+++
b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformIT.java
@@ -24,7 +24,9 @@ import
org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
import org.junit.Before;
import org.junit.Test;
+import static java.nio.charset.StandardCharsets.UTF_8;
import static
org.apache.maven.surefire.its.fixture.HelperAssertions.assumeJavaVersion;
+import static
org.apache.maven.surefire.its.fixture.HelperAssertions.convertUnicodeToUTF8;
public class JUnitPlatformIT
extends SurefireJUnit4IntegrationTestCase
@@ -51,12 +53,12 @@ public class JUnitPlatformIT
.executeTest()
.verifyErrorFree( 7 );
- validator.getSurefireReportsFile(
"junitplatformenginejupiter.DisplayNameTest.txt" )
- .assertContainsText( "<< ✨ >>" );
+ validator.getSurefireReportsFile(
"junitplatformenginejupiter.DisplayNameTest.txt", UTF_8 )
+ .assertContainsText( convertUnicodeToUTF8( "<< ✨ >>" ) );
- validator.getSurefireReportsFile(
"TEST-junitplatformenginejupiter.DisplayNameTest.xml" )
- .assertContainsText( "testcase name=\"73$71 ✔\"
classname=\"junitplatformenginejupiter.DisplayNameTest\"" )
- .assertContainsText( "testcase name=\"73$72 ✔\"
classname=\"junitplatformenginejupiter.DisplayNameTest\"" );
+ validator.getSurefireReportsFile(
"TEST-junitplatformenginejupiter.DisplayNameTest.xml", UTF_8 )
+ .assertContainsText( "testcase name=\"73$71 ✔\" classname=\"<< ✨
>>\"" )
+ .assertContainsText( "testcase name=\"73$72 ✔\" classname=\"<< ✨
>>\"" );
}
@Test
diff --git
a/surefire-its/src/test/resources/junit-platform-engine-jupiter/pom.xml
b/surefire-its/src/test/resources/junit-platform-engine-jupiter/pom.xml
index 192cc8a..99255c6 100644
--- a/surefire-its/src/test/resources/junit-platform-engine-jupiter/pom.xml
+++ b/surefire-its/src/test/resources/junit-platform-engine-jupiter/pom.xml
@@ -32,6 +32,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.jupiter.version>5.2.0</junit.jupiter.version>
+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<!--