diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-09-11 18:05:21 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-09-11 18:05:21 +0200 |
| commit | 04a1dd1c175cb0fc18419e0261f99bf35199ab59 (patch) | |
| tree | db85b4c3fc1ce082447c8454ac57343bed1c44df /tests/rustdoc-js | |
| parent | bfd5a264c7e02ee831aab919c272539cf9395a1d (diff) | |
| download | rust-04a1dd1c175cb0fc18419e0261f99bf35199ab59.tar.gz rust-04a1dd1c175cb0fc18419e0261f99bf35199ab59.zip | |
Add regression test for literal search on paths
Diffstat (limited to 'tests/rustdoc-js')
| -rw-r--r-- | tests/rustdoc-js/literal-path.js | 23 | ||||
| -rw-r--r-- | tests/rustdoc-js/literal-path.rs | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/rustdoc-js/literal-path.js b/tests/rustdoc-js/literal-path.js new file mode 100644 index 00000000000..ea999ea1a6f --- /dev/null +++ b/tests/rustdoc-js/literal-path.js @@ -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': [ + ], + }, +]; diff --git a/tests/rustdoc-js/literal-path.rs b/tests/rustdoc-js/literal-path.rs new file mode 100644 index 00000000000..fa7685fd966 --- /dev/null +++ b/tests/rustdoc-js/literal-path.rs @@ -0,0 +1,7 @@ +pub mod some { + pub struct Path; +} + +pub mod somea { + pub struct Path; +} |
