Skip to content

Add a few integration tests #2717

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

krishanjmistry
Copy link
Contributor

@krishanjmistry krishanjmistry commented May 29, 2025

Adds a few tests based on the suggestions in #2677

Tests should be self-explanatory from the commit message.

I've changed BookTest to use snapbox's Command to make use of its built in stdin - useful for testing commands like init and then giving answers to the prompts

This should cover the following from the suggestions:

  • TOC fold tests
  • {{#title}}
  • init with git author configured
  • init check contents of .gitignore
  • Check that renderer or preprocessor uses PATH to locate mdbook-FOO

In addition, I've included:

  • Tests verifying the generated 404 page, including the default, when a 404.md is provided, and when output.html.input-404 is configured
  • Test verifying the behaviour when a theme folder already exists when using the init command

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 29, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants