Add regression test for reexports in search results
This commit is contained in:
parent
e96c330af5
commit
eb2dd95041
2 changed files with 28 additions and 0 deletions
17
src/test/rustdoc-js/reexport.js
Normal file
17
src/test/rustdoc-js/reexport.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
// exact-check
|
||||
|
||||
const QUERY = ['Subscriber', 'AnotherOne'];
|
||||
|
||||
const EXPECTED = [
|
||||
{
|
||||
'others': [
|
||||
{ 'path': 'reexport::fmt', 'name': 'Subscriber' },
|
||||
{ 'path': 'reexport', 'name': 'FmtSubscriber' },
|
||||
],
|
||||
},
|
||||
{
|
||||
'others': [
|
||||
{ 'path': 'reexport', 'name': 'AnotherOne' },
|
||||
],
|
||||
},
|
||||
];
|
11
src/test/rustdoc-js/reexport.rs
Normal file
11
src/test/rustdoc-js/reexport.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
// This test enforces that the (renamed) reexports are present in the search results.
|
||||
|
||||
pub mod fmt {
|
||||
pub struct Subscriber;
|
||||
}
|
||||
mod foo {
|
||||
pub struct AnotherOne;
|
||||
}
|
||||
|
||||
pub use foo::AnotherOne;
|
||||
pub use fmt::Subscriber as FmtSubscriber;
|
Loading…
Add table
Reference in a new issue