From: Jeremias Maerki Date: Mon, 16 Feb 2009 08:28:04 +0000 (+0000) Subject: Additional filter possibility for BatchDiffer so previously faulty cases can quickly... X-Git-Tag: fop-1_0~115^2~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=59d51cf45b180e8e849aa44fe7a0ade4424e09b0;p=xmlgraphics-fop.git 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 --- 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);