lazarus-ccr/components/fpspreadsheet/tests
2014-09-02 12:58:06 +00:00
..
colortests.pas fpspreadsheet: Make sure that Excel's system colors are kept when colors are added to a palette. Fix BIFF 2 font color mismatch in unit test. All green again. 2014-08-11 22:39:47 +00:00
datetests.pas fpspreadsheet: Fix arithmetic overflow in ooxml writer in case of empty worksheet but existing row records. Use try-finally blocks around test cases to make sure that memory is released and temp file is deleted in case of exceptions due to failed tests. Fix memory leak in rpn formula calculation (spreadtestgui, however, still reports a lot of memory leaks). 2014-08-05 21:42:34 +00:00
emptycelltests.pas fpspreadsheet: Fix ODS writing incorrect blank cells. Add blank cells to emptycelltests. 2014-08-09 13:39:15 +00:00
errortests.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
fonttests.pas fpspreadsheet: Fix arithmetic overflow in ooxml writer in case of empty worksheet but existing row records. Use try-finally blocks around test cases to make sure that memory is released and temp file is deleted in case of exceptions due to failed tests. Fix memory leak in rpn formula calculation (spreadtestgui, however, still reports a lot of memory leaks). 2014-08-05 21:42:34 +00:00
formattests.pas fpspreadsheet: Log warning if BIFF writer tries to write more than 64 colors. More clean-up. 2014-08-11 11:16:43 +00:00
formulatests.pas fpspreadsheet: Fix formula issues with ods (written error values still different between fps and ods). 2014-09-02 09:25:54 +00:00
internaltests.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
manualtests.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
numberstests.pas fpspreadsheet: Fix arithmetic overflow in ooxml writer in case of empty worksheet but existing row records. Use try-finally blocks around test cases to make sure that memory is released and temp file is deleted in case of exceptions due to failed tests. Fix memory leak in rpn formula calculation (spreadtestgui, however, still reports a lot of memory leaks). 2014-08-05 21:42:34 +00:00
numformatparsertests.pas
optiontests.pas fpspreadsheet: Complete database import demo. Rename dbexport to db_export_import. Fix biff2 crashing in ReadPane because of duplicate variable FWorksheet. 2014-08-06 08:50:36 +00:00
readme.txt
rpnformulaunit.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
spreadtestcli.lpi
spreadtestcli.lpr
spreadtestgui.lpi fpspreadsheet: Fix ods formula issues, seems to be ok now. 2014-09-02 12:58:06 +00:00
spreadtestgui.lpr fpspreadsheet: Fix ODS writer beginning to write rows/columns at first used row/column instead of 0. ODS error message test active now. Separate errortests and virtualmodetests from internaltests. All tests passed (Win32, Laz trunk, fpc 2.6.4). 2014-08-08 09:02:37 +00:00
spreadtestgui.res
stringtests.pas fpspreadsheet: Fix arithmetic overflow in ooxml writer in case of empty worksheet but existing row records. Use try-finally blocks around test cases to make sure that memory is released and temp file is deleted in case of exceptions due to failed tests. Fix memory leak in rpn formula calculation (spreadtestgui, however, still reports a lot of memory leaks). 2014-08-05 21:42:34 +00:00
testbiff8_1899.xls fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
testbiff8_1904.xls fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats. 2014-06-23 09:15:56 +00:00
testcases_calcrpnformula.inc fpspreadsheet: Fix ods formula issues, seems to be ok now. 2014-09-02 12:58:06 +00:00
testdbwriter_firebird.sql
testdbwriter_postgresql.sql
testdbwriter.ini
testdbwriter.pas
testdbwriter.rc
testdbwriter.res
testodf_1899.ods fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats. 2014-06-23 09:15:56 +00:00
testodf_1904.ods fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats. 2014-06-23 09:15:56 +00:00
testooxml_1899.xlsx fpspreadsheet: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +00:00
testooxml_1904.xlsx fpspreadsheet: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +00:00
testsutility.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
virtualmodetests.pas fpspreadsheet: Log warning if BIFF writer tries to write more than 64 colors. More clean-up. 2014-08-11 11:16:43 +00:00

Tests for fpspreadsheet

spreadtestgui
=============
Lets you quickly run tests in a GUI.
If there are problems, you can open the spreadtestgui.lpr in Lazarus, compile it with debug mode, and trace through the offending test and the fpspreadsheet code it calls.
More details: FPCUnit documentation

spreadtestcli
=============
Command line version of the above, extended with database output. Useful for scripting use (use e.g. --all --format=plain.

For output to an embedded Firebird database, make sure the required dlls/packages are present and run the program, e.g:
spreadtestcli --comment="Hoped to have fixed that string issue" --revision="482"
(the revision is the SVN revision number, so you can keep track of regresssions)

More details: FPCUnit documentation and
https://bitbucket.org/reiniero/testdbwriter

The tests
=========
Basic tests read XLS files and check the retrieved values against a list. This tests whether reading dates, text etc works.

Another test is to take that list of normative values, write it to an xls file, then read back and compare with the original list. This basically tests whether write support is correct.
The files are written to the temp directory. They are deleted on succesful test completion; otherwise they are kept so you can open them up with a spreadsheet application/mso dumper tool/hex editor and check what exactly got written.

Finally, there is a manual test unit: these tests write out cells to a spreadsheet file (testmanual.xls) that the user should inspect himself. Examples are tests for colors, formatting etc.

Adding tests
============
For most tests:
- Add new cells to the A column in the relevant xls files; see comments in files.
- Add corresponding normative/expected value in the relevant test unit; increase array size
- Add your tests that read the data from xls and checks against the norm array.

Note that tests that check for known failures are quite valuable. You can indicate you expect an exception etc. 

Ideas for more tests:
- add more tests to internaltests to explicitly tests fpspreadsheet functions/procedures/properties that don't read/write to xls/xml files
- writing RPN formulas in the manualtests unit
- more xls/xml file formats tested
- more corner cases
- writing all data available to various sheets and reading it back to test whether complex sheets work
- reading faulty files to test exception handling

For more details, please see the FPCUnit documentation.