You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/08/12 21:52:22 UTC
svn commit: r1695605 -
/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
Author: nick
Date: Wed Aug 12 19:52:22 2015
New Revision: 1695605
URL: http://svn.apache.org/r1695605
Log:
More consistent test-file output for Excel testing
Modified:
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java?rev=1695605&r1=1695604&r2=1695605&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java Wed Aug 12 19:52:22 2015
@@ -48,11 +48,13 @@ import org.apache.poi.ss.util.CellRefere
*
*/
public final class TestFormulaEvaluatorBugs extends TestCase {
- private static final boolean OUTPUT_TEST_FILES = false;
+ private static boolean OUTPUT_TEST_FILES = false;
private String tmpDirName;
protected void setUp() {
tmpDirName = System.getProperty("java.io.tmpdir");
+ OUTPUT_TEST_FILES = Boolean.parseBoolean(
+ System.getProperty("org.apache.poi.test.output_test_files", "False"));
}
/**
@@ -529,10 +531,12 @@ public final class TestFormulaEvaluatorB
cell = row.getCell(CellReference.convertColStringToIndex("H"));
assertEquals("A", cell.getStringCellValue());
- // Enable this block to write out, and check in Excel
-//FileOutputStream out = new FileOutputStream("/tmp/test.xls");
-//wb.write(out);
-//out.close();
+ // Enable this to write out + check in Excel
+ if (OUTPUT_TEST_FILES) {
+ FileOutputStream out = new FileOutputStream("/tmp/test.xls");
+ wb.write(out);
+ out.close();
+ }
}
private Ptg[] getPtgs(HSSFCell cell) {
assertEquals(HSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org