rustdoc-search: add test case for all/index.html search

This commit is contained in:
Michael Howell
2025-09-25 15:23:49 -07:00
parent 8daad494b1
commit 51ae86dec9
2 changed files with 13 additions and 0 deletions

View File

@@ -20,3 +20,15 @@ assert-document-property: {"title": '"another one" Search - Rust'}
press-key: "Escape"
assert-document-property: {"title": |title|}
// check that all.html does it correctly, too.
go-to: "file://" + |DOC_PATH| + "/test_docs/all.html"
assert-document-property: {"title": "List of all items in this crate"}
call-function: ("perform-search", {"query": "verify"})
assert-document-property: {"title": '"verify" Search - Rust'}
// check that index.html does it correctly, too.
go-to: "file://" + |DOC_PATH| + "/index.html"
assert-document-property: {"title": "Index of crates"}
call-function: ("perform-search", {"query": "verify"})
assert-document-property: {"title": '"verify" Search - Rust'}

View File

@@ -1,3 +1,4 @@
//@ compile-flags: --enable-index-page -Z unstable-options
//! The point of this crate is to be able to have enough different "kinds" of
//! documentation generated so we can test each different features.
#![doc(html_playground_url="https://play.rust-lang.org/")]