pmd: fix failing unit test

This commit is contained in:
Andreas Dangel 2012-11-28 21:25:56 +01:00
parent a66bbf2193
commit 33c7af965c

View File

@ -475,11 +475,11 @@ public class RuleSetFactoryTest {
+ " is missing 'externalInfoURL' attribute" + " is missing 'externalInfoURL' attribute"
+ PMD.EOL; + PMD.EOL;
} else { } else {
String expectedExternalInfoURL = "http://pmd.sourceforge.net/snapshot/rules/" String expectedExternalInfoURL = "http://pmd.sourceforge.net/.+/rules/"
+ fileName.replaceAll("rulesets/", "").replaceAll( + fileName.replaceAll("rulesets/", "").replaceAll(
".xml", "") + ".html#" + rule.getName(); ".xml", "") + ".html#" + rule.getName();
if (!expectedExternalInfoURL.equals(rule if (rule.getExternalInfoUrl() == null
.getExternalInfoUrl())) { || !rule.getExternalInfoUrl().matches(expectedExternalInfoURL)) {
invalidExternalInfoURL++; invalidExternalInfoURL++;
messages += "Rule " messages += "Rule "
+ fileName + fileName