Add regression test for reexports in search results

This commit is contained in:
Guillaume Gomez 2022-10-30 13:58:00 +01:00
parent e96c330af5
commit eb2dd95041
2 changed files with 28 additions and 0 deletions

View 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' },
],
},
];

View 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;