Add regression test for literal search on paths
This commit is contained in:
23
tests/rustdoc-js/literal-path.js
Normal file
23
tests/rustdoc-js/literal-path.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// exact-check
|
||||
|
||||
// This test ensures that literal search is always applied on elements of the path.
|
||||
|
||||
const EXPECTED = [
|
||||
{
|
||||
'query': '"some::path"',
|
||||
'others': [
|
||||
{ 'path': 'literal_path::some', 'name': 'Path' },
|
||||
],
|
||||
},
|
||||
{
|
||||
'query': '"somea::path"',
|
||||
'others': [
|
||||
{ 'path': 'literal_path::somea', 'name': 'Path' },
|
||||
],
|
||||
},
|
||||
{
|
||||
'query': '"soma::path"',
|
||||
'others': [
|
||||
],
|
||||
},
|
||||
];
|
||||
7
tests/rustdoc-js/literal-path.rs
Normal file
7
tests/rustdoc-js/literal-path.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
pub mod some {
|
||||
pub struct Path;
|
||||
}
|
||||
|
||||
pub mod somea {
|
||||
pub struct Path;
|
||||
}
|
||||
Reference in New Issue
Block a user