Skip to content

Commit 4473fcd

Browse files
authoredOct 31, 2022
Rollup merge of #103758 - GuillaumeGomez:reexports-search-result-test, r=notriddle
Add regression test for reexports in search results Fixes #86337. r? ``@notriddle``
2 parents c61a32a + eb2dd95 commit 4473fcd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
 

‎src/test/rustdoc-js/reexport.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// exact-check
2+
3+
const QUERY = ['Subscriber', 'AnotherOne'];
4+
5+
const EXPECTED = [
6+
{
7+
'others': [
8+
{ 'path': 'reexport::fmt', 'name': 'Subscriber' },
9+
{ 'path': 'reexport', 'name': 'FmtSubscriber' },
10+
],
11+
},
12+
{
13+
'others': [
14+
{ 'path': 'reexport', 'name': 'AnotherOne' },
15+
],
16+
},
17+
];

‎src/test/rustdoc-js/reexport.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This test enforces that the (renamed) reexports are present in the search results.
2+
3+
pub mod fmt {
4+
pub struct Subscriber;
5+
}
6+
mod foo {
7+
pub struct AnotherOne;
8+
}
9+
10+
pub use foo::AnotherOne;
11+
pub use fmt::Subscriber as FmtSubscriber;

0 commit comments

Comments
 (0)