reformat exclude classes regular expression for OOXMLLite
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1739643 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae5b894886
commit
dca380f057
@ -574,4 +574,21 @@ public class StringUtil {
|
||||
9133, // 0xf0fe bracerightbt
|
||||
' ', // 0xf0ff not defined
|
||||
};
|
||||
|
||||
// Could be replaced with org.apache.commons.lang3.StringUtils#join
|
||||
@Internal
|
||||
public static String join(Object[] array, String separator) {
|
||||
if (array.length == 0) return "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(array[0]);
|
||||
for (int i=1; i<array.length; i++) {
|
||||
sb.append(separator).append(array[i]);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Internal
|
||||
public static String join(String separator, Object... array) {
|
||||
return join(array, separator);
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,8 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.internal.TextListener;
|
||||
import org.junit.runner.JUnitCore;import org.junit.runner.Result;
|
||||
import org.junit.runner.JUnitCore;
|
||||
import org.junit.runner.Result;
|
||||
|
||||
/**
|
||||
* Build a 'lite' version of the ooxml-schemas.jar
|
||||
@ -90,12 +91,33 @@ public final class OOXMLLite {
|
||||
void build() throws IOException, ClassNotFoundException {
|
||||
List<Class<?>> lst = new ArrayList<Class<?>>();
|
||||
//collect unit tests
|
||||
String exclude = StringUtil.join("|",
|
||||
"BaseTestXCell",
|
||||
"TestSXSSFWorkbook\\$\\d",
|
||||
"TestSXSSFWorkbook\\$NullOutputStream",
|
||||
"TestUnfixedBugs",
|
||||
"MemoryUsage",
|
||||
"TestDataProvider",
|
||||
"TestDataSamples",
|
||||
"All.+Tests",
|
||||
"ZipFileAssert",
|
||||
"PkiTestUtils",
|
||||
"TestCellFormatPart\\$\\d",
|
||||
"TestSignatureInfo\\$\\d",
|
||||
"TestCertificateEncryption\\$CertData",
|
||||
"TestPOIXMLDocument\\$OPCParser",
|
||||
"TestPOIXMLDocument\\$TestFactory",
|
||||
"TestXSLFTextParagraph\\$DrawTextParagraphProxy",
|
||||
"TestXSSFExportToXML\\$\\d",
|
||||
"TestXSSFExportToXML\\$DummyEntityResolver",
|
||||
"TestFormulaEvaluatorOnXSSF\\$Result",
|
||||
"TestFormulaEvaluatorOnXSSF\\$SS",
|
||||
"TestMultiSheetFormulaEvaluatorOnXSSF\\$Result",
|
||||
"TestMultiSheetFormulaEvaluatorOnXSSF\\$SS",
|
||||
"TestXSSFBugs\\$\\d"
|
||||
);
|
||||
System.out.println("Collecting unit tests from " + _testDir);
|
||||
collectTests(_testDir, _testDir, lst, ".+.class$",
|
||||
".+(BaseTestXCell|TestUnfixedBugs|MemoryUsage|TestDataProvider|TestDataSamples|All.+Tests|ZipFileAssert|PkiTestUtils|TestCellFormatPart\\$\\d|TestSignatureInfo\\$\\d|"
|
||||
+ "TestSXSSFWorkbook\\$\\d|TestCertificateEncryption\\$CertData|TestPOIXMLDocument\\$OPCParser|TestPOIXMLDocument\\$TestFactory|TestXSLFTextParagraph\\$DrawTextParagraphProxy|"
|
||||
+ "TestXSSFExportToXML\\$\\d|TestXSSFExportToXML\\$DummyEntityResolver|TestSXSSFWorkbook\\$NullOutputStream|TestFormulaEvaluatorOnXSSF\\$Result|TestFormulaEvaluatorOnXSSF\\$SS|"
|
||||
+ "TestMultiSheetFormulaEvaluatorOnXSSF\\$Result|TestMultiSheetFormulaEvaluatorOnXSSF\\$SS|TestXSSFBugs\\$\\d).class");
|
||||
collectTests(_testDir, _testDir, lst, ".+.class$", ".+(" + exclude + ").class");
|
||||
System.out.println("Found " + lst.size() + " classes");
|
||||
|
||||
//run tests
|
||||
|
Loading…
Reference in New Issue
Block a user