lazarus-ccr/components/fpspreadsheet/tests
2021-04-14 22:17:15 +00:00
..
celltypetests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
colortests.pas fpspreadsheet: Add Worksheet.TabColor support. Update biff8/ooxml/ods readers/writers for it. Add test case for it. 2020-02-10 15:23:30 +00:00
colrowtests.pas fpspreadsheet: Add TsWorksheetIndicator as new visual control. Donated by forum user "abcthing" (https://forum.lazarus.freepascal.org/index.php/topic,49312.0.html) 2020-04-15 22:19:20 +00:00
commenttests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
conditionalformattests.pas fpspreadsheet: Add, with r/w support, conditional date formats cfcLastYear, cfcThisYear, cfcNextYear. 2020-07-29 17:41:00 +00:00
copytests.pas
datetests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
dbexporttests.pas
emptycelltests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
enumeratortests.pas
errortests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
exceltests.pas
fileformattests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
fonttests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
formattests.pas fpspreadsheet: Fix inconsistencies in test suite introduced by FPC 3.2.0 2020-07-16 20:47:01 +00:00
formulatests.pas fpspreadsheet: Fix 3d formulas crashing when reading Excel2003/XML files because target sheets have not yet been loaded. 2019-07-18 21:38:01 +00:00
hyperlinktests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
internaltests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
lazarus32x32.png
manualtests.pas
mathtests.pas fpspreadsheet: Avoid Banker's rounding (https://forum.lazarus.freepascal.org/index.php/topic,46104.0.html). Add unit tests for it. 2019-07-20 16:52:10 +00:00
numberstests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
numformatparsertests.pas fpspreadsheet: Fix unit tests broken after r7152 (lower-case "d", "m" and "y" date format symbols). 2020-01-28 11:32:46 +00:00
optiontests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
pagelayouttests.pas fpspreadsheet: Fix test suite failures with compiler checks ON. 2021-04-14 22:17:15 +00:00
protectiontests.pas fpspreadsheet: Done - Excel2003/XML format passes all tests. 2019-07-19 22:42:59 +00:00
readme.txt
rpnformulaunit.pas
singleformulatests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +00:00
sortingtests.pas
spreadtestcli.lpi fpspreadsheet: Fix test suite crashing due to changes in ODS writer. All green again. 2020-07-08 16:59:42 +00:00
spreadtestcli.lpr fpspreadsheet: Fix test suite crashing due to changes in ODS writer. All green again. 2020-07-08 16:59:42 +00:00
spreadtestgui.lpi fpspreadsheet: Fix test suite failures with compiler checks ON. 2021-04-14 22:17:15 +00:00
spreadtestgui.lpr fpspreadsheet: Add a few test cases for conditional formatting 2020-07-08 22:01:09 +00:00
spreadtestgui.res
ssttests.pas
stringtests.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
testbiff8_1899.xls
testbiff8_1904.xls
testcases_calc3dformula.inc
testcases_calcrpnformula.inc fpspreadsheet: Fix incorrect handling of cell reference by new forumula INDIRECT(). Add test cases for formula ADDRESS(). 2020-11-11 23:43:44 +00:00
testdbwriter_firebird.sql
testdbwriter_postgresql.sql
testdbwriter.ini
testdbwriter.pas
testdbwriter.rc
testdbwriter.res
testodf_1899.ods
testodf_1904.ods
testooxml_1899.xlsx
testooxml_1904.xlsx
testsutility.pas fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
testxml_1899.xml fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
testxml_1904.xml fpspreadsheet: Add test cases for Excel 2003/XML format. Not complete yet, some test failures. 2019-07-17 22:33:22 +00:00
virtualmodetests.pas fpspreadsheet: Extend file-based test cases for Excel2003/XML file format. Still lots of issues. 2019-07-18 08:51:02 +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.