diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-19 20:14:47 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-21 22:02:54 +0200 |
| commit | d5eade2b941e349be598286b6ca6954d18ac4323 (patch) | |
| tree | 58b51f31e19e7944b0a4a6cc2a4503eec5741d0a /src/test/rustdoc-js | |
| parent | 31e7cc4ba44f16d1ed3b2c5c20f32fe5928e0615 (diff) | |
| download | rust-d5eade2b941e349be598286b6ca6954d18ac4323.tar.gz rust-d5eade2b941e349be598286b6ca6954d18ac4323.zip | |
Add alias tests
Diffstat (limited to 'src/test/rustdoc-js')
| -rw-r--r-- | src/test/rustdoc-js/alias-1.js | 17 | ||||
| -rw-r--r-- | src/test/rustdoc-js/alias-2.js | 18 | ||||
| -rw-r--r-- | src/test/rustdoc-js/alias-3.js | 17 | ||||
| -rw-r--r-- | src/test/rustdoc-js/alias.js | 19 |
4 files changed, 71 insertions, 0 deletions
diff --git a/src/test/rustdoc-js/alias-1.js b/src/test/rustdoc-js/alias-1.js new file mode 100644 index 00000000000..496bd559b87 --- /dev/null +++ b/src/test/rustdoc-js/alias-1.js @@ -0,0 +1,17 @@ +// 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 = '&'; + +const EXPECTED = { + 'others': [ + { 'path': 'std', 'name': 'reference' }, + ], +}; diff --git a/src/test/rustdoc-js/alias-2.js b/src/test/rustdoc-js/alias-2.js new file mode 100644 index 00000000000..f31786df67c --- /dev/null +++ b/src/test/rustdoc-js/alias-2.js @@ -0,0 +1,18 @@ +// 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 = '+'; + +const EXPECTED = { + 'others': [ + { 'path': 'std::ops::AddAssign', 'name': 'AddAssign' }, + { 'path': 'std::ops::Add', 'name': 'Add' }, + ], +}; diff --git a/src/test/rustdoc-js/alias-3.js b/src/test/rustdoc-js/alias-3.js new file mode 100644 index 00000000000..d9e1ca5f760 --- /dev/null +++ b/src/test/rustdoc-js/alias-3.js @@ -0,0 +1,17 @@ +// 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 = '!'; + +const EXPECTED = { + 'others': [ + { 'path': 'std', 'name': 'never' }, + ], +}; diff --git a/src/test/rustdoc-js/alias.js b/src/test/rustdoc-js/alias.js new file mode 100644 index 00000000000..a0500f24c17 --- /dev/null +++ b/src/test/rustdoc-js/alias.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 = '['; + +const EXPECTED = { + 'others': [ + { 'path': 'std', 'name': 'slice' }, + { 'path': 'std::ops::IndexMut', 'name': 'IndexMut' }, + { 'path': 'std::ops::Index', 'name': 'Index' }, + ], +}; |
