1 package org.apache.maven.it;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.Properties;
24
25 import org.apache.maven.it.util.ResourceExtractor;
26
27
28
29
30
31
32
33
34 public class MavenITmng2254PomEncodingTest
35 extends AbstractMavenIntegrationTestCase
36 {
37
38 public MavenITmng2254PomEncodingTest()
39 {
40 super( "(2.0.7,)" );
41 }
42
43
44
45
46
47
48 public void testitMNG2254 ()
49 throws Exception
50 {
51 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2254" );
52
53 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
54 verifier.setAutoclean( false );
55 verifier.deleteDirectory( "utf-8/target" );
56 verifier.deleteDirectory( "latin-1/target" );
57 verifier.executeGoal( "validate" );
58 verifier.verifyErrorFreeLog();
59 verifier.resetStreams();
60
61 Properties utf8 = verifier.loadProperties( "utf-8/target/pom.properties" );
62 assertEquals( "TEST-CHARS: \u00DF\u0131\u03A3\u042F\u05D0\u20AC", utf8.getProperty( "project.description" ) );
63
64 Properties latin1 = verifier.loadProperties( "latin-1/target/pom.properties" );
65 assertEquals( "TEST-CHARS: \u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF", latin1.getProperty( "project.description" ) );
66 }
67
68 }