about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-10 07:52:15 +0000
committerbors <bors@rust-lang.org>2018-05-10 07:52:15 +0000
commitc8a3ec1ce6dc12f86de39bf5ac55fc2fa38358f8 (patch)
treec2870f831a6a7edfca099b17202cff7d66f3559d /src/test
parent95d0b9e96795aea20ac4a1fad9251982714d3c55 (diff)
parent2c91b49fe45b71e30f3e47e185671fc75b36952f (diff)
downloadrust-c8a3ec1ce6dc12f86de39bf5ac55fc2fa38358f8.tar.gz
rust-c8a3ec1ce6dc12f86de39bf5ac55fc2fa38358f8.zip
Auto merge of #50432 - GuillaumeGomez:fix-vec-new-search, r=QuietMisdreavus
Fix rustdoc pathes search

Fixes #50086.

Depends on #50302.

r? @QuietMisdreavus
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-js/pinbox-new.js20
-rw-r--r--src/test/rustdoc-js/vec-new.js19
2 files changed, 39 insertions, 0 deletions
diff --git a/src/test/rustdoc-js/pinbox-new.js b/src/test/rustdoc-js/pinbox-new.js
new file mode 100644
index 00000000000..061c7b30741
--- /dev/null
+++ b/src/test/rustdoc-js/pinbox-new.js
@@ -0,0 +1,20 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// exact-check
+
+const QUERY = 'pinbox::new';
+
+const EXPECTED = {
+    'others': [
+        { 'path': 'std::boxed::PinBox', 'name': 'new' },
+        { 'path': 'alloc::boxed::PinBox', 'name': 'new' },
+    ],
+};
diff --git a/src/test/rustdoc-js/vec-new.js b/src/test/rustdoc-js/vec-new.js
new file mode 100644
index 00000000000..702953e2e9d
--- /dev/null
+++ b/src/test/rustdoc-js/vec-new.js
@@ -0,0 +1,19 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+const QUERY = 'Vec::new';
+
+const EXPECTED = {
+    'others': [
+        { 'path': 'std::vec::Vec', 'name': 'new' },
+        { 'path': 'std::vec::Vec', 'name': 'ne' },
+        { 'path': 'std::boxed::PinBox', 'name': 'new' },
+    ],
+};