lazarus-ccr/components/fpspreadsheet/tests
2016-01-19 23:14:43 +00:00
..
celltypetests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
colortests.pas fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed). 2015-05-28 20:08:24 +00:00
commenttests.pas fpspreadsheet: Unit tests for hyperlinks. Some issues left. 2015-03-08 00:50:10 +00:00
copytests.pas fpspreadsheet: Fix runtime errors of guitests in debug mode 2015-06-02 08:31:00 +00:00
datetests.pas fpspreadsheet: Add header/footer parser for conversion between Excel and ODS header/footer. Still some bugs. 2015-05-09 22:40:59 +00:00
dbexporttests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
emptycelltests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
enumeratortests.pas fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration. 2015-03-04 17:30:59 +00:00
errortests.pas fpspreadsheet: Massive reconstruction of file format registration: it is now possible to add user-defined readers and writers without modifying the fpsspreadsheet sources (--> new unit fpsregfileformats). Add (incomplete) unit for the SYLK file format (---> new unit fpssylk) to show this in the demo project visual/fpsctrls/demo_ctrls. Update all visual demos. 2015-10-09 13:27:04 +00:00
fonttests.pas fpspreadsheet: Replace new fpsutils.GetSetValues by typinfo.SetToString. 2015-10-31 10:35:16 +00:00
formattests.pas fpspreadsheet: Move TsCellFormatList from fpsTypes.pas to fpsClasses.pas. Updated chm help file after proof-reading. 2015-06-01 19:58:26 +00:00
formulatests.pas fpspreadsheet: Another exotic formula test case: multiple application of % operator. 2015-06-08 17:11:46 +00:00
hyperlinktests.pas fpspreadsheet: Improved handling of empty cells containing hyperlinks. 2015-03-20 20:51:07 +00:00
insertdeletetests.pas fpspreadsheet: Move some general procedures from fpspreadsheet.pas to fpsutils.pas 2015-05-31 16:34:40 +00:00
internaltests.pas fpspreadsheet: Fix test suite not removing a particular temporay file after test, 2016-01-19 23:14:43 +00:00
manualtests.pas fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed). 2015-05-28 20:08:24 +00:00
numberstests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
numformatparsertests.pas fpspreadsheet: Make number format parser independent of workbook. Some cleanup. 2015-05-31 16:06:22 +00:00
optiontests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
pagelayouttests.pas fpspreadsheet: Fix pagelayout unit test. Passed now. 2015-05-11 14:29:55 +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: optimize workbook font infrastructure to avoid that missing font 4 dictated by Excel. Remove UsedFormattingField uffBold (obsolete since supporting fonts). 2015-03-11 22:28:07 +00:00
sortingtests.pas fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration. 2015-03-04 17:30:59 +00:00
spreadtestcli.lpi fpspreadsheet: Make number format parser independent of workbook. Some cleanup. 2015-05-31 16:06:22 +00:00
spreadtestcli.lpr fpspreadsheet: Make number format parser independent of workbook. Some cleanup. 2015-05-31 16:06:22 +00:00
spreadtestgui.lpi fpspreadsheet: Fix test suite not removing a particular temporay file after test, 2016-01-19 23:14:43 +00:00
spreadtestgui.lpr fpspreadsheet: Add pagelayout testcases for page margins. 2015-05-03 21:41:27 +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: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +00:00
testbiff8_1899.xls fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testbiff8_1904.xls fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testcases_calcrpnformula.inc fpspreadsheet: Another exotic formula test case: multiple application of % operator. 2015-06-08 17:11:46 +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: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testodf_1904.ods fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testooxml_1899.xlsx fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testooxml_1904.xlsx fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range. 2015-05-02 14:25:39 +00:00
testsutility.pas fpspreadsheet: Redo handling for formulas: 2014-08-30 18:03:22 +00:00
virtualmodetests.pas fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples. 2015-01-17 22:57:23 +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.