mirror of https://github.com/apache/maven.git
MNG2025 patch to add encoding unit tests
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@585318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6186d77c3
commit
fe1e81cc25
|
@ -156,4 +156,30 @@ public class MavenProjectTest
|
|||
MavenProject clonedProject = new MavenProject( projectToClone );
|
||||
assertNotNull( "clonedProject - distributionManagement", clonedProject.getDistributionManagementArtifactRepository() );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Maven uses FileReaders by default to read POMs.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testUTF8EncodedProject() throws Exception
|
||||
{
|
||||
File f = getFileForClasspathResource( "utf-8-encoded-pom.xml" );
|
||||
MavenProject utf8EncodedProject = getProject( f );
|
||||
|
||||
assertEquals( "öäüß", utf8EncodedProject.getDescription() );
|
||||
}
|
||||
|
||||
/**
|
||||
* This test case will not fail, because 8bit encodings won't corrupt the parser.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void testISOEncodedProject() throws Exception
|
||||
{
|
||||
File f = getFileForClasspathResource( "iso-8859-15-encoded-pom.xml" );
|
||||
MavenProject isoEncodedProject = getProject( f );
|
||||
|
||||
assertEquals( "öäüß", isoEncodedProject.getDescription() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-15"?>
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<name>Maven</name>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<description>öäüß</description>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-plexus-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<plexusConfiguration>src/conf/plexus.conf</plexusConfiguration>
|
||||
<plexusConfigurationPropertiesFile>src/conf/plexus.properties</plexusConfigurationPropertiesFile>
|
||||
<plexusApplicationName>Continuum</plexusApplicationName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>plexus:runtime</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<plexusApplicationName>ContinuumPro</plexusApplicationName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<name>Maven</name>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<description>öäüß</description>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-plexus-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<configuration>
|
||||
<plexusConfiguration>src/conf/plexus.conf</plexusConfiguration>
|
||||
<plexusConfigurationPropertiesFile>src/conf/plexus.properties</plexusConfigurationPropertiesFile>
|
||||
<plexusApplicationName>Continuum</plexusApplicationName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>plexus:runtime</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<plexusApplicationName>ContinuumPro</plexusApplicationName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue