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"
+ PMD.EOL;
} else {
String expectedExternalInfoURL = "http://pmd.sourceforge.net/snapshot/rules/"
String expectedExternalInfoURL = "http://pmd.sourceforge.net/.+/rules/"
+ fileName.replaceAll("rulesets/", "").replaceAll(
".xml", "") + ".html#" + rule.getName();
if (!expectedExternalInfoURL.equals(rule
.getExternalInfoUrl())) {
if (rule.getExternalInfoUrl() == null
|| !rule.getExternalInfoUrl().matches(expectedExternalInfoURL)) {
invalidExternalInfoURL++;
messages += "Rule "
+ fileName