lazarus-ccr/components/fpspreadsheet/tests
2014-08-05 08:25:17 +00:00
..
colortests.pas fpspreadsheet: OOXML reader supports background color now. Test cases passed. 2014-07-29 22:09:29 +00:00
datetests.pas fpspreadsheet: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +00:00
emptycelltests.pas fpspreadsheet: Reducing hints and warnings, still a lot... 2014-06-19 19:25:40 +00:00
fonttests.pas fpspreadsheet: Support reading of font from xlsx files. Add unit tests, 3 fails related to font color. 2014-07-27 22:44:17 +00:00
formattests.pas fpspreadsheet: Support for column widths and row heights of xlsx reader. Extend unit tests --> passed. Add "debug with heaptrc" build mode to spreadtestgui (--> there is an unfixed memory leak in fpsfunc). 2014-08-03 21:21:31 +00:00
formulatests.pas fpspreadsheet: Support for column widths and row heights of xlsx reader. Extend unit tests --> passed. Add "debug with heaptrc" build mode to spreadtestgui (--> there is an unfixed memory leak in fpsfunc). 2014-08-03 21:21:31 +00:00
internaltests.pas fpspreadsheet: Rename virtual mode event handler OnNeedCellData to OnWriteCellData. Add another virtual mode event handler for reading, OnReadCellData. 2014-07-23 21:51:06 +00:00
manualtests.pas Fix using correct locale settings in Ubuntu. 2014-07-23 16:00:01 +00:00
numberstests.pas fpspreadsheet: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +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: OOXML reading/writing support for frozen panes. Simplify OOXML's cell writing strategy by omitting empty cells. 2014-08-04 19:11:17 +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: try to fix date/time handling on Linux/Unix by adding clocale. Needs to be tested. 2014-07-23 08:15:28 +00:00
spreadtestcli.lpi + Tests: add support for LibreOffice/OpenOffice .ods spreadsheets 2014-03-23 11:34:37 +00:00
spreadtestcli.lpr * Tests: cosmetic/slight tightening file exist test 2013-12-27 13:55:56 +00:00
spreadtestgui.lpi fpspreadsheet: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +00:00
spreadtestgui.lpr fpspreadsheet: Add test case for empty cells for all biff and ods. All passed. 2014-06-01 22:11:31 +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: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +00:00
testbiff8_1899.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
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 floating point formula tests cases to give matching results even without tolerance value. Fix BIFFExplorer to show all digits of floating point cell values. 2014-07-19 23:14:53 +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 + Add support for more/easier RPN formulas in XLS 2014-04-08 09:48:30 +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: Add number, string and date/time tests for xlsx reading. 2014-08-05 08:25:17 +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.