diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-11-23 20:33:41 -0800 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2020-12-03 14:11:37 -0800 |
| commit | b9035194c0c434d89ec776176a88406cc4af66cc (patch) | |
| tree | 3fdb3cc27459719d1692185abd21fa59c1c55514 | |
| parent | 07e9426efba69e8b662f2a896326b157f5d0ba2d (diff) | |
| download | rust-b9035194c0c434d89ec776176a88406cc4af66cc.tar.gz rust-b9035194c0c434d89ec776176a88406cc4af66cc.zip | |
Add rustdoc-js test
Finally!
| -rw-r--r-- | src/test/rustdoc-js/basic.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-js/summaries.js | 7 | ||||
| -rw-r--r-- | src/test/rustdoc-js/summaries.rs | 18 |
3 files changed, 26 insertions, 1 deletions
diff --git a/src/test/rustdoc-js/basic.rs b/src/test/rustdoc-js/basic.rs index 1b4963fcebe..da946a58b1c 100644 --- a/src/test/rustdoc-js/basic.rs +++ b/src/test/rustdoc-js/basic.rs @@ -1,2 +1,2 @@ -/// Foo +/// Docs for Foo pub struct Foo; diff --git a/src/test/rustdoc-js/summaries.js b/src/test/rustdoc-js/summaries.js new file mode 100644 index 00000000000..773357610d7 --- /dev/null +++ b/src/test/rustdoc-js/summaries.js @@ -0,0 +1,7 @@ +const QUERY = 'summaries'; + +const EXPECTED = { + 'others': [ + { 'path': '', 'name': 'summaries', 'desc': 'This <em>summary</em> has a link and <code>code</code>.' }, + ], +}; diff --git a/src/test/rustdoc-js/summaries.rs b/src/test/rustdoc-js/summaries.rs new file mode 100644 index 00000000000..beb91e286b6 --- /dev/null +++ b/src/test/rustdoc-js/summaries.rs @@ -0,0 +1,18 @@ +#![crate_type = "lib"] +#![crate_name = "summaries"] + +//! This *summary* has a [link] and `code`. +//! +//! This is the second paragraph. +//! +//! [link]: https://example.com + +/// This `code` will be rendered in a code tag. +/// +/// This text should not be rendered. +pub struct Sidebar; + +/// ```text +/// this block should not be rendered +/// ``` +pub struct Sidebar2; |
