lazarus-ccr/components/fpspreadsheet/tests
2014-10-13 14:00:46 +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
dbexporttests.pas + fpspreadsheet: add spreadsheet dataset export visual package laz_fpspreadsheetexport_visual.lpk 2014-10-13 14:00:46 +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: Fix writing non-printable characters writing to xml-like formats (xlsx, ods, wikitable). Add test case to error tests. Improve syntaxhighlighter for wikitablemaker demo (still not perfect). 2014-09-29 22:27:03 +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: Test cases for merged cells in xls, xlsx, ods files. Passed. 2014-09-12 19:26:31 +00:00
formulatests.pas * fpspreadsheet: cosmetic 2014-10-01 12:02:49 +00:00
insertdeletetests.pas fpspreadsheet: Fix speed loss introduced by merging of cells (-> speed-up of some unit tests) 2014-09-23 22:24:35 +00:00
internaltests.pas fpspreadsheet: Ignore case of sheetname in validation. Better calling convention for un-merging cell ranges. 2014-09-12 14:14:05 +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 fpspreadsheet: Add to the numformatparser test some more complicated formatting strings found in Excel files -> passed. 2014-06-13 14:35:36 +00:00
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 + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
rpnformulaunit.pas fpspreadsheet: Move rpn stuff from fpspreadsheet.pas to a new unit fpsRPN.pas. Move translatable strings from fpspreadsheet.pas to a new unit fpsStrings.pas. Make sure that all demos still run in the new environment. 2014-09-17 08:38:31 +00:00
spreadtestcli.lpi + fpspreadsheet: dbexport unit and tests. Initial version. 2014-10-01 12:04:08 +00:00
spreadtestcli.lpr + fpspreadsheet: dbexport unit and tests. Initial version. 2014-10-01 12:04:08 +00:00
spreadtestgui.lpi fpspreadsheet: Remove some unnecessary calls to lo() (no idea why I introduced them...). Fix range check errors in the test suite. 2014-10-06 12:55:28 +00:00
spreadtestgui.lpr fpspreadsheet: Beginning with test cases for insert/delete of columns and rows. 2014-09-18 21:51:56 +00:00
spreadtestgui.res + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
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: Remove some unnecessary calls to lo() (no idea why I introduced them...). Fix range check errors in the test suite. 2014-10-06 12:55:28 +00:00
testdbwriter_firebird.sql Cosmetic: better test reporting database 2014-03-25 14:44:04 +00:00
testdbwriter_postgresql.sql + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.ini + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.pas Cosmetic: better test reporting database 2014-03-25 14:44:04 +00:00
testdbwriter.rc + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.res * fpspreadsheet: resource file 2014-09-30 12:00:04 +00:00
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.