texdoc
texdoc copied to clipboard
Comprehensive testing script with RSpec + Aruba
Texdoc used to have only limited test scripts. Since I became a maintainer of the program, I have been trying to write comprehensive test scripts with RSpec + Aruba, but the work is still in progress.
Here's a rough plan of the entire specs (this will be updated accordingly):
- action
- [x] files: the
--filesaction - [x] help: the
--helpaction - [x] version: the
--versionaction - [x] just view: the
--just-viewaction
- [x] files: the
- config
- [x] built-in: the default values
- [x] environment variables: does ENV work?
- [x] texdoc.cnf: does texdoc.cnf work?
- [x] texdoc-dist.cnf: is the shipped texdoc.cnf fine?
- misc
- [x] errors: error messages and status codes
- [x] getopt: the command line option (CMO) parser
- [x] verbose: info messages (messages output with -v option)
- mode
- [x] view: the view mode (-w)
- [x] mixed: the mixed mode (-m)
- [x] list: the list mode (-l)
- [x] showall: the showall mode (-s)
- score
- [x] adjscore: the adjscore directive
- [ ] heuristic: the heuristic pattern score, bonus score
- [ ] order: docfile order
- search
- [ ] fuzzy: fuzzy search
- [x] aliases: the aliases in texdoc.cnf
- [x] texdocs: documents in TEXDOCS
- [ ] database: documents in databases
- unit
- [x] texdoclib: check for overall behavior
- [x] alias: unit tests for texdoclib-alias.tlu
- [x] score: unit tests for texdoclib-score.tlu
- [x] search: unit tests for texdoclib-search.tlu
- [x] util: unit tests for texdoclib-util.tlu
- view
- [x] file detection: for each extension
- [x] command: the view commands