aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2023-04-21Add license (GNU GPLv3+)Teddy Wing
2023-04-21xfdf.lisp: Get nested fields workingTeddy Wing
This now prints nested form fields correctly. * Needed a separate string format for the container field. * Had to use `consp`, otherwise `nil` checkbox values wouldn't be recognised and a corresponding `<value/>` line wouldn't be printed. * Needed to add a missing nested field to the test's expected value.
2023-04-20test: Add test for hierarchical formTeddy Wing
Checkboxes don't work on IRS tax forms using the current flat XFDF structure. In order to activate them, their values must be set using a nested, or hierarchical field structure. Add a test to facilitate development of nested XFDF field generation.
2023-04-20test: Remove local `run` functionTeddy Wing
Originally took this idea from Steve Losh's cl-digraph: https://github.com/sjl/cl-digraph/blob/936a18cb7de3a7c7e59c244cf4326f217afec85f/test/tests.lisp However, it turns out it wasn't necessary, as I can reference the 1am `run` function directly in the ASDF `test-op`.
2023-04-16Output XFDF fields into XMLTeddy Wing
Write `<field>` elements to the XFDF XML based on the cons cells in the `fields` input list. Change true and nil values to the FDF/XFDF checkbox value format of "Yes" and "Off". Also decided to use lowercase `t` to match the case of `nil`. Not sure if that makes sense.
2023-04-16Add test systemTeddy Wing
Write a test for the `write-xfdf` function. Worked out how to create the test system from: - https://lispcookbook.github.io/cl-cookbook/testing.html - https://github.com/sjl/cl-digraph/blob/master/cl-digraph.test.asd - https://github.com/fukamachi/dexador/blob/master/dexador-test.asd Add the test string to the `write-xfdf` function to pass the test and check that the test runner is set up correctly.