o Created UT from MNG-3839

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@729506 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-12-26 16:32:30 +00:00
parent abc85c68f4
commit be34e915c8
2 changed files with 577 additions and 0 deletions

View File

@ -336,6 +336,16 @@ public class PomConstructionTest
assertEquals( null, pom.getValue( "distributionManagement/site/name" ) );
}
public void testXmlTextCoalescing()
throws Exception
{
PomTestWrapper pom = buildPom( "xml-coalesce-text" );
assertEquals( "A Test Project Property", pom.getValue( "properties/prop0" ) );
assertEquals( "That's a test!", pom.getValue( "properties/prop1" ) );
assertEquals( 32 * 1024,
pom.getValue( "properties/prop2" ).toString().trim().replaceAll( "[\n\r]", "" ).length() );
}
private PomArtifactResolver artifactResolver( String basedir )
{
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );

View File

@ -0,0 +1,567 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng3839</groupId>
<artifactId>coreit</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<name>Maven Integration Test :: MNG-3839</name>
<description>
Test that POM parsing properly coalesces text data.
</description>
<properties>
<!--
This checks the coalescing of CHARACTERS and CDATA events. Note that inner whitespace must be retained.
-->
<prop0>A <![CDATA[ Test ]]> Project<![CDATA[ ]]>Property</prop0>
<!--
This checks the coalescing of CHARACTERS events that are interleaved with comments. Note that inner whitespace
formed by whitespace-only events must be retained.
-->
<prop1><!-- X -->That's<!-- X --> <!-- X -->a<!-- X --> <!-- X -->test!<!-- X --></prop1>
<!--
This checks the coalescing of CHARACTERS events which would otherwise be reported in chunks of the internal parser
buffer size (usually 4 or 8 KB). The text block is designed such that its length is exactly 32 KB after leading
and traling whitespace has been removed and all line terminators have been removed.
-->
<prop2>
00 KB 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
01 KB 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
02 KB 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
03 KB 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 4 5 6 X
0 1 2 3 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