;dev:test:errors: readme

This commit is contained in:
Simon Michael 2025-11-18 08:05:50 -10:00
parent fe3fa26940
commit de4f72a080

View File

@ -21,18 +21,22 @@ Each error has
- sometimes supplementary data files (like `csvdateparse.csv.rules`) - sometimes supplementary data files (like `csvdateparse.csv.rules`)
- an autogenerated shelltestrunner test (like `balanced.test`) - an autogenerated shelltestrunner test (like `balanced.test`)
*XXX: This is hard to maintain, and has bitrotted/had manual fixups; ## Procedures
the following won't generate accurate passing tests exactly*
To update this readme with the latest error messages, run `make readme`. To update this readme with the latest error messages, run `make readme`.
To regenerate the shelltestrunner tests, run `make tests`. To regenerate the shelltestrunner tests, run `make tests`.
This is imperfect; some tests will require manual fixups (see also hledger2shelltest).
To test all of these error messages with hledger, run `make test`. To test all of these error messages with hledger, run `make test`.
Requires shelltestrunner, the latest version is best.
To test these errors with flycheck-hledger, To test these errors with flycheck-hledger,
customize `flycheck-hledger-*` in Emacs to enable all appropriate checks, customize `flycheck-hledger-*` in Emacs to enable all appropriate checks,
then open the data files to see how flycheck handles them. then open the data files to see how flycheck handles them.
`C-c ! l` opens a pane for easy viewing. `C-c ! l` opens a pane for easy viewing.
<!-- Use absolute urls as this page can be viewed on github or hledger.org. --> <!-- Use absolute urls here, this page can be viewed on github or hledger.org. -->
[hledger/test/errors/]: https://github.com/simonmichael/hledger/tree/master/hledger/test/errors [hledger/test/errors/]: https://github.com/simonmichael/hledger/tree/master/hledger/test/errors
[ERRORS]: https://hledger.org/ERRORS.html [ERRORS]: https://hledger.org/ERRORS.html
[hledger check]: https://hledger.org/hledger.html#check [hledger check]: https://hledger.org/hledger.html#check