mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 10:16:09 -05:00
This adds the ability to use multiple books for the GUI tests. This is helpful since some tests need special configuration, and sharing the same book can make it difficult or impossible to test different configurations. It also makes it difficult to make changes to the test_book since it can affect other tests. This works by placing the books in the tests/gui/books directory. The test runner will automatically build all the books. The gui tests can then just access the DOC_PATH with the name of the book. Books are now saved in a temp directory to make it easier to use the DOC_PATH variable, instead of being tests/gui/books/book_name/book which is a little awkward. Following commits will restructure the existing book. This is just a mechanical move.
52 lines
1.4 KiB
TOML
52 lines
1.4 KiB
TOML
[book]
|
|
title = "mdBook test book"
|
|
description = "A demo book to test and validate changes"
|
|
authors = ["YJDoc2"]
|
|
language = "en"
|
|
|
|
[rust]
|
|
edition = "2018"
|
|
|
|
[output.html]
|
|
mathjax-support = true
|
|
hash-files = true
|
|
|
|
[output.html.playground]
|
|
editable = true
|
|
line-numbers = true
|
|
|
|
[output.html.search]
|
|
limit-results = 20
|
|
use-boolean-and = true
|
|
boost-title = 2
|
|
boost-hierarchy = 2
|
|
boost-paragraph = 1
|
|
expand = true
|
|
heading-split-level = 2
|
|
|
|
[output.html.redirect]
|
|
"/format/config.html" = "../prefix.html"
|
|
|
|
# This is a source without a fragment, and one with a fragment that goes to
|
|
# the same place. The redirect with the fragment is not necessary, since that
|
|
# is the default behavior.
|
|
"/pointless-fragment.html" = "prefix.html"
|
|
"/pointless-fragment.html#foo" = "prefix.html#foo"
|
|
|
|
"/rename-page-and-fragment.html" = "prefix.html"
|
|
"/rename-page-and-fragment.html#orig" = "prefix.html#new"
|
|
|
|
"/rename-page-fragment-elsewhere.html" = "prefix.html"
|
|
"/rename-page-fragment-elsewhere.html#orig" = "suffix.html#new"
|
|
|
|
# Rename fragment on an existing page.
|
|
"/prefix.html#orig" = "prefix.html#new"
|
|
# Rename fragment on an existing page to another page.
|
|
"/prefix.html#orig-new-page" = "suffix.html#new"
|
|
|
|
"/full-url-with-fragment.html" = "https://www.rust-lang.org/#fragment"
|
|
|
|
"/full-url-with-fragment-map.html" = "https://www.rust-lang.org/"
|
|
"/full-url-with-fragment-map.html#a" = "https://www.rust-lang.org/#new1"
|
|
"/full-url-with-fragment-map.html#b" = "https://www.rust-lang.org/#new2"
|