From fa2e214a439488e06c4a144a2b3e37409810d9f4 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sun, 17 Nov 2024 08:07:16 -0700 Subject: [PATCH] rustdoc-search: add standalone trailing `::` test Follow up for #132569 --- tests/rustdoc-js/trailing.js | 7 +++++++ tests/rustdoc-js/trailing.rs | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 tests/rustdoc-js/trailing.js create mode 100644 tests/rustdoc-js/trailing.rs diff --git a/tests/rustdoc-js/trailing.js b/tests/rustdoc-js/trailing.js new file mode 100644 index 00000000000..df5dd22ca4e --- /dev/null +++ b/tests/rustdoc-js/trailing.js @@ -0,0 +1,7 @@ +// exact-check +const EXPECTED = { + 'query': 'inner::', + 'others': [ + { 'path': 'trailing::inner', 'name': 'function' }, + ], +} diff --git a/tests/rustdoc-js/trailing.rs b/tests/rustdoc-js/trailing.rs new file mode 100644 index 00000000000..5c7c9362ffb --- /dev/null +++ b/tests/rustdoc-js/trailing.rs @@ -0,0 +1,3 @@ +pub mod inner { + pub fn function() {} +}