lazarus-ccr/components/fpspreadsheet/tests
2018-08-09 14:28:17 +00:00
..
celltypetests.pas fpspreadsheet: Fix sudden fails of test suite (Why did these test cases work earlier?) 2018-06-05 09:33:29 +00:00
colortests.pas fpspreadsheet: Fix biff format writing non-editable palette indexes to file (Excel cannot edit the cells any more - see http://forum.lazarus.freepascal.org/index.php/topic,36903.0.html) 2017-05-17 17:26:48 +00:00
commenttests.pas fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left). 2016-03-18 19:50:40 +00:00
copytests.pas fpspreadsheet: Redo storage of formulas: formulas now are stored in a separate tree independent of the cells tree. The field FormulaValue of TCell record was removed. All unit tests passed. Demos updated (issues of speedtest due to SST in BIFF8 found - not related). 2018-05-30 22:15:07 +00:00
datetests.pas fpspreadsheet: Fix reading/writing of milliseconds. Add corresponding test cases. (NOTE: ods cannot display tenths of a second). 2018-03-07 22:35:19 +00:00
dbexporttests.pas
emptycelltests.pas fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left). 2016-03-18 19:50:40 +00:00
enumeratortests.pas
errortests.pas fpspreadsheet: Fill unused BIFF5 and BIFF8 palette entries by default colors to avoid Excel XP show an incomplete color dialog. 2017-05-18 10:50:22 +00:00
exceltests.pas fpspreadsheet: Fix compilation of new Excel unit test for non-Windows systems. 2016-03-09 09:55:28 +00:00
fileformattests.pas fpspreadsheet: Improved autodetection of file format (e.g. xls files renamed to xlsx - see https://forum.lazarus.freepascal.org/index.php/topic,41830.msg291032.html). Add corresponding test cases. 2018-07-10 08:32:50 +00:00
fonttests.pas fpspreadsheet: Write biff8 text cells to shared-string-table to overcome string truncation at 255 characters. 2017-11-03 13:39:12 +00:00
formattests.pas fpspreadsheet: Allow number formats with no leading digits. Add corresponding unit test cases. 2018-02-28 12:14:19 +00:00
formulatests.pas fpspreadsheet: Improve prev commit. Fix math formulas with non-numeric strings not returning result #VALUE! Add unit tests for this. 2018-08-05 13:35:25 +00:00
hyperlinktests.pas fpspreadsheet: Fix unit reference error in spreadtestgui. 2016-11-06 08:36:37 +00:00
insertdeletetests.pas fpspreadsheet: Redo storage of formulas: formulas now are stored in a separate tree independent of the cells tree. The field FormulaValue of TCell record was removed. All unit tests passed. Demos updated (issues of speedtest due to SST in BIFF8 found - not related). 2018-05-30 22:15:07 +00:00
internaltests.pas fpspreadsheet: Improve prev commit. Fix math formulas with non-numeric strings not returning result #VALUE! Add unit tests for this. 2018-08-05 13:35:25 +00:00
lazarus32x32.png fpspreadsheet: Add tests for Excel being able to read files containing commens, images, header/footer images, and hyperlinks. 2016-03-08 13:38:04 +00:00
manualtests.pas
numberstests.pas
numformatparsertests.pas fpspreadsheet: Allow number formats with no leading digits. Add corresponding unit test cases. 2018-02-28 12:14:19 +00:00
optiontests.pas fpspreadsheet: Add unit tests for hidden worksheets. 2017-03-01 20:16:47 +00:00
pagelayouttests.pas
protectiontests.pas fpspreadsheet: Add writing support for xls password hashes. Add test case for it. 2017-03-07 22:02:09 +00:00
readme.txt
rpnformulaunit.pas
singleformulatests.pas fpspreadsheet: Fix reading of ods files containing formulas with several arguments (separator semicolon). Update unit tests. (Still issues with files posted at https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293792.html). 2018-08-09 14:28:17 +00:00
sortingtests.pas fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left). 2016-03-18 19:50:40 +00:00
spreadtestcli.lpi fpspreadsheet: Fix error in Round function. Add a second unit test for Round. 2018-02-27 22:21:49 +00:00
spreadtestcli.lpr
spreadtestgui.lpi fpspreadsheet: Improved autodetection of file format (e.g. xls files renamed to xlsx - see https://forum.lazarus.freepascal.org/index.php/topic,41830.msg291032.html). Add corresponding test cases. 2018-07-10 08:32:50 +00:00
spreadtestgui.lpr fpspreadsheet: Improved autodetection of file format (e.g. xls files renamed to xlsx - see https://forum.lazarus.freepascal.org/index.php/topic,41830.msg291032.html). Add corresponding test cases. 2018-07-10 08:32:50 +00:00
spreadtestgui.res fpspreadsheet: Fix conversion of biff palette colors for fonts in reader. 2017-05-17 21:43:30 +00:00
ssttests.pas fpspreadsheet: Write biff8 text cells to shared-string-table to overcome string truncation at 255 characters. 2017-11-03 13:39:12 +00:00
stringtests.pas fpspreadsheet: Fix max string length test. 2017-11-03 21:04:07 +00:00
testbiff8_1899.xls
testbiff8_1904.xls
testcases_calc3dformula.inc fpspreadsheet: Simplify handling of 3d references. Fix bug related to 3d reference type 'Sheet1:Sheet2!A1'. 2018-05-16 17:44:02 +00:00
testcases_calcrpnformula.inc fpspreadsheet: Fix reading of ods files containing formulas with several arguments (separator semicolon). Update unit tests. (Still issues with files posted at https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293792.html). 2018-08-09 14:28:17 +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
virtualmodetests.pas fpspreadsheet: Fix compilation of spreadsheet tests 2016-09-24 18:31:03 +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.