Skip to content

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

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

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

@leno23 leno23 commented May 17, 2026

Copy link
Copy Markdown

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

`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
@ehuss ehuss closed this May 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it easier to specify the chapter path in mdbook test

3 participants