Fix ant tests - PMDTaskTest is moved partly to java,

javascript and xml
This commit is contained in:
Andreas Dangel
2014-10-06 22:46:01 +02:00
parent a36239bbc1
commit 17b573ef81
18 changed files with 413 additions and 258 deletions

View File

@@ -0,0 +1,19 @@
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.ant;
import org.junit.Test;
public class PMDTaskTest extends AbstractAntTestHelper {
public PMDTaskTest() {
super.antTestScriptFilename = "pmdtasktest.xml";
}
@Test
public void testXML() {
executeTarget("testXML");
assertOutputContaining("Potentialy mistyped CDATA section with extra [ at beginning or ] at the end.");
}
}

View File

@@ -0,0 +1,7 @@
<root>
<child>
<![CDATA[[
some text data
]]>
</child>
</root>

View File

@@ -0,0 +1,17 @@
<project name="pmdtasktest" default="all">
<property name="pmd.home" value="${user.dir}" />
<property name="src" value="src/main/java" />
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" />
<target name="testXML">
<pmd rulesetfiles="${pmd.home}/src/main/resources/rulesets/xml/basic.xml">
<sourceLanguage name="xml" version="" />
<formatter type="text" toConsole="true" />
<fileset dir="${pmd.home}/src/test/resources/ant/xml/">
<include name="*.xml" />
</fileset>
</pmd>
</target>
</project>