diff --git a/components/fpspreadsheet/tests/formulatests.pas b/components/fpspreadsheet/tests/formulatests.pas index 39ad87d5d..a1514564e 100644 --- a/components/fpspreadsheet/tests/formulatests.pas +++ b/components/fpspreadsheet/tests/formulatests.pas @@ -138,7 +138,6 @@ begin // Write out all test formulas // All formulas are in column B {$I testcases_calcrpnformula.inc} -// WriteRPNFormulaSamples(MyWorksheet, AFormat, true, UseRPNFormula); MyWorkBook.WriteToFile(TempFile, AFormat, true); finally MyWorkbook.Free; diff --git a/components/fpspreadsheet/tests/testcases_calcrpnformula.inc b/components/fpspreadsheet/tests/testcases_calcrpnformula.inc index cb324410b..cf404f778 100644 --- a/components/fpspreadsheet/tests/testcases_calcrpnformula.inc +++ b/components/fpspreadsheet/tests/testcases_calcrpnformula.inc @@ -270,6 +270,20 @@ SetLength(sollValues, Row+1); sollValues[Row] := FloatResult(cellB1*0.01); + // Exotic test case from OpenOffice test file + inc(Row); + formula := '200%%'; + MyWorksheet.WriteUTF8Text(Row, 0, formula); + if UseRPNFormula then + MyWorksheet.WriteRPNFormula(Row, 1, CreateRPNFormula( + RPNNumber(200, + RPNFunc(fekPercent, + RPNFunc(fekPercent, nil))))) + else + MyWorksheet.WriteFormula(row, 1, formula); + SetLength(sollvalues, Row+1); + sollValues[Row] := FloatResult(0.02); + // Power symbol inc(Row); formula := '2^0.5';