aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-02-16 08:28:04 +0000
committerJeremias Maerki <jeremias@apache.org>2009-02-16 08:28:04 +0000
commit59d51cf45b180e8e849aa44fe7a0ade4424e09b0 (patch)
tree237b599a58069d794265bda39e90c3bad28579ea
parentb8f7fb859b3d3b3ddfaec899b402814ab75a29d4 (diff)
downloadxmlgraphics-fop-59d51cf45b180e8e849aa44fe7a0ade4424e09b0.tar.gz
xmlgraphics-fop-59d51cf45b180e8e849aa44fe7a0ade4424e09b0.zip
Additional filter possibility for BatchDiffer so previously faulty cases can quickly be regenerated.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@744858 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/java/org/apache/fop/visual/BatchDiffer.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/visual/BatchDiffer.java b/test/java/org/apache/fop/visual/BatchDiffer.java
index 396657bee..08ac886a2 100644
--- a/test/java/org/apache/fop/visual/BatchDiffer.java
+++ b/test/java/org/apache/fop/visual/BatchDiffer.java
@@ -35,8 +35,10 @@ import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.container.ContainerUtil;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.AndFileFilter;
import org.apache.commons.io.filefilter.IOFileFilter;
import org.apache.commons.io.filefilter.SuffixFileFilter;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -164,6 +166,14 @@ public class BatchDiffer {
if (cfg.getChild("filter-disabled").getValueAsBoolean(true)) {
filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
}
+ String manualFilter = cfg.getChild("manual-filter").getValue(null);
+ if (manualFilter != null) {
+ if (manualFilter.indexOf('*') < 0) {
+ manualFilter = manualFilter + '*';
+ }
+ filter = new AndFileFilter(
+ new WildcardFileFilter(manualFilter), filter);
+ }
int maxfiles = cfg.getChild("max-files").getValueAsInteger(-1);
Collection files = FileUtils.listFiles(srcDir, filter, null);