summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2023-05-28 11:55:56 -0700
committerEric Huss <eric@huss.org>2023-05-28 12:03:03 -0700
commit1db52ff53170a8c3ea28ef248082946da11a256d (patch)
treed3a4a7a64c8b93f1cde2ae1861ddc122e9ccec3e /tests
parente3be293420665d81aa7b1677aed9ad2f3e557b3c (diff)
Fix search for custom heading attributes
Diffstat (limited to 'tests')
-rw-r--r--tests/rendered_output.rs5
-rw-r--r--tests/searchindex_fixture.json4
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/rendered_output.rs b/tests/rendered_output.rs
index 7bc5e7ae..7626b9e8 100644
--- a/tests/rendered_output.rs
+++ b/tests/rendered_output.rs
@@ -755,6 +755,7 @@ mod search {
let no_headers = get_doc_ref("first/no-headers.html");
let duplicate_headers_1 = get_doc_ref("first/duplicate-headers.html#header-text-1");
let conclusion = get_doc_ref("conclusion.html#conclusion");
+ let heading_attrs = get_doc_ref("first/heading-attributes.html#both");
let bodyidx = &index["index"]["index"]["body"]["root"];
let textidx = &bodyidx["t"]["e"]["x"]["t"];
@@ -786,6 +787,10 @@ mod search {
docs[&no_headers]["body"],
"Capybara capybara capybara. Capybara capybara capybara. ThisLongWordIsIncludedSoWeCanCheckThatSufficientlyLongWordsAreOmittedFromTheSearchIndex."
);
+ assert_eq!(
+ docs[&heading_attrs]["breadcrumbs"],
+ "First Chapter » Heading Attributes » Heading with id and classes"
+ );
}
// Setting this to `true` may cause issues with `cargo watch`,
diff --git a/tests/searchindex_fixture.json b/tests/searchindex_fixture.json
index 1fcfcdab..85463028 100644
--- a/tests/searchindex_fixture.json
+++ b/tests/searchindex_fixture.json
@@ -23,9 +23,9 @@
"first/duplicate-headers.html#header-text",
"first/duplicate-headers.html#header-text-1",
"first/duplicate-headers.html#header-text-2",
- "first/heading-attributes.html#heading-attributes",
+ "first/heading-attributes.html#attrs",
"first/heading-attributes.html#heading-with-classes",
- "first/heading-attributes.html#heading-with-id-and-classes",
+ "first/heading-attributes.html#both",
"second.html#second-chapter",
"second/nested.html#testing-relative-links-for-the-print-page",
"second/nested.html#some-section",