summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/rustdoc-js
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-js')
-rw-r--r--tests/rustdoc-js/doc-alias.js2
-rw-r--r--tests/rustdoc-js/macro-search.js10
-rw-r--r--tests/rustdoc-js/macro-search.rs10
-rw-r--r--tests/rustdoc-js/module-substring.js1
4 files changed, 20 insertions, 3 deletions
diff --git a/tests/rustdoc-js/doc-alias.js b/tests/rustdoc-js/doc-alias.js
index 7bb0cbe38..62c8e7a74 100644
--- a/tests/rustdoc-js/doc-alias.js
+++ b/tests/rustdoc-js/doc-alias.js
@@ -1,5 +1,3 @@
-// exact-check
-
const QUERY = [
'StructItem',
'StructFieldItem',
diff --git a/tests/rustdoc-js/macro-search.js b/tests/rustdoc-js/macro-search.js
new file mode 100644
index 000000000..2b179ce14
--- /dev/null
+++ b/tests/rustdoc-js/macro-search.js
@@ -0,0 +1,10 @@
+// exact-check
+
+const QUERY = 'abracadabra!';
+
+const EXPECTED = {
+ 'others': [
+ { 'path': 'macro_search', 'name': 'abracadabra' },
+ { 'path': 'macro_search', 'name': 'abracadabra_b' },
+ ],
+};
diff --git a/tests/rustdoc-js/macro-search.rs b/tests/rustdoc-js/macro-search.rs
new file mode 100644
index 000000000..dc397490c
--- /dev/null
+++ b/tests/rustdoc-js/macro-search.rs
@@ -0,0 +1,10 @@
+#[macro_export]
+macro_rules! abracadabra {
+ () => {}
+}
+#[macro_export]
+macro_rules! abracadabra_b {
+ () => {}
+}
+pub fn abracadabra() {}
+pub fn abracadabra_c() {}
diff --git a/tests/rustdoc-js/module-substring.js b/tests/rustdoc-js/module-substring.js
index a446c39eb..f17a97f13 100644
--- a/tests/rustdoc-js/module-substring.js
+++ b/tests/rustdoc-js/module-substring.js
@@ -4,6 +4,5 @@ const EXPECTED = {
'others': [
{ 'path': 'module_substring::Sig', 'name': 'pc' },
{ 'path': 'module_substring::Si', 'name': 'pc' },
- { 'path': 'module_substring::Si', 'name': 'pa' },
],
};