Author: bentmann
Date: Sun Mar  1 19:14:05 2009
New Revision: 749076

URL: http://svn.apache.org/viewvc?rev=749076&view=rev
Log:
[MNG-2254] the encoding parameter in xml declaration of POM is ignored

o Added UT

Added:
    
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/
   (with props)
    
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/
   (with props)
    
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
   (with props)
    
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/
   (with props)
    
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
   (with props)
Modified:
    
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java

Modified: 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java?rev=749076&r1=749075&r2=749076&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 (original)
+++ 
maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/PomConstructionTest.java
 Sun Mar  1 19:14:05 2009
@@ -881,6 +881,15 @@
     }
     //*/
 
+    public void testPomEncoding()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "pom-encoding/utf-8" );
+        assertEquals( "TEST-CHARS: \u00DF\u0131\u03A3\u042F\u05D0\u20AC", 
pom.getValue( "description" ) );
+        pom = buildPom( "pom-encoding/latin-1" );
+        assertEquals( "TEST-CHARS: 
\u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF", pom.getValue( "description" ) );
+    }
+
     private void assertPathWithNormalizedFileSeparators( Object value )
     {
         assertEquals( new File( value.toString() ).getPath(), value.toString() 
);

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml?rev=749076&view=auto
==============================================================================
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
 (added)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
 Sun Mar  1 19:14:05 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+NOTE: This POM's XML declaration intentionally declares Latin-1 encoding.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng2254</groupId>
+  <artifactId>latin-1</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2254 :: Latin-1</name> 
+  <description>TEST-CHARS: ÄÖÜäöüß</description>
+</project>

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/latin-1/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml?rev=749076&view=auto
==============================================================================
--- 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
 (added)
+++ 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
 Sun Mar  1 19:14:05 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+NOTE: This POM's XML declaration specified no encoding which should therefore 
default to UTF-8.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng2254</groupId>
+  <artifactId>utf-8</artifactId>
+  <version>0.1-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2254 :: UTF-8</name> 
+  <description>TEST-CHARS: ßıΣЯא€</description>
+</project>

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-project/src/test/resources-project-builder/pom-encoding/utf-8/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to