Open
Description
With the introduction of #2676, I'd like to make some progress on improving the test coverage. Some ideas for additions and improvements:
- Try to get full coverage for all features in the integration testsuite. Some examples;
{{#playground example.rs editable}}
- TOC fold tests
{{#title}}
- All CLI flags (very few are currently covered)
init
with git author configuredinit
check contents of.gitignore
- Check that renderer or preprocessor uses PATH to locate
mdbook-FOO
- Any config option in book.toml that isn't in a test.
- Tests for configuring book.toml via environment variables.
- Hunt for error cases not covered (bonus to use coverage tools to drive this)
- Check the cli help output for every command (see
cli::help
)- Fix the term.svg files so that they have color. Offhand I don't remember how to force color to enable.
- The
toc
tests could use some review and cleanup.- Instead of using
select
, would it make sense to validate the contents of the raw HTML instead? (This is also hampered by the lack of the ability to prettify the HTML, which is otherwise all on one line.)
- Instead of using
- Can pretty_assertions be replaced with snapbox assert? Or should we just remove it?