diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-01-06 09:46:55 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-01-06 09:46:55 +0000 |
commit | b3d37c54d8b15a5ee868b955d404897265ee2558 (patch) | |
tree | d241c06354230f75bc159749ebabda801ef06407 /test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java | |
parent | 679a1074cf22f664d0553e5934b8e9a505d7fe69 (diff) | |
download | xmlgraphics-fop-b3d37c54d8b15a5ee868b955d404897265ee2558.tar.gz xmlgraphics-fop-b3d37c54d8b15a5ee868b955d404897265ee2558.zip |
Ability to restrict the testcases being processed to one for debugging. Just specify its filename as a system property "fop.layoutengine.single".
Example: -Dfop.layoutengine.single=padding2.xml
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java')
-rw-r--r-- | test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java index 4bfffbe63..6b38839ce 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java @@ -23,6 +23,10 @@ import java.util.Collection; import java.util.Iterator; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.filefilter.IOFileFilter; +import org.apache.commons.io.filefilter.NameFileFilter; +import org.apache.commons.io.filefilter.SuffixFileFilter; +import org.apache.commons.io.filefilter.TrueFileFilter; import junit.framework.Test; import junit.framework.TestCase; @@ -45,8 +49,15 @@ public class LayoutEngineTestSuite { final LayoutEngineTester tester = new LayoutEngineTester(backupDir); + String single = System.getProperty("fop.layoutengine.single"); + IOFileFilter filter; + if (single != null) { + filter = new NameFileFilter(single); + } else { + filter = new SuffixFileFilter(".xml"); + } Collection files = FileUtils.listFiles(new File(mainDir, "testcases"), - new String[] {"xml"}, true); + filter, TrueFileFilter.INSTANCE); Iterator i = files.iterator(); while (i.hasNext()) { File f = (File)i.next(); |