Skip to content

fix(test): accept book-root paths for --chapter filter#3113

Open
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:fix/test-chapter-path-3009
Open

fix(test): accept book-root paths for --chapter filter#3113
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:fix/test-chapter-path-3009

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

  • mdbook test --chapter now matches paths relative to the book root with the configured src prefix (e.g. src/chapter_1.md from tab completion), in addition to chapter title and SUMMARY-relative paths
  • Adds unit test for path normalization

Fixes #3009

Test plan

  • cargo test -p mdbook-driver chapter_matches_filter
  • CI

Made with Cursor

`mdbook test --chapter` now matches chapter titles, paths relative to
SUMMARY.md, and paths prefixed with the book `src` directory (e.g.
`src/chapter_1.md` from shell tab completion).

Fixes rust-lang#3009

Co-authored-by: Cursor <cursoragent@cursor.com>
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

Make it easier to specify the chapter path in mdbook test

2 participants