Skip to content

Commit b903519

Browse files
committed
Add rustdoc-js test
Finally!
1 parent 07e9426 commit b903519

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

src/test/rustdoc-js/basic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/// Foo
1+
/// Docs for Foo
22
pub struct Foo;

src/test/rustdoc-js/summaries.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const QUERY = 'summaries';
2+
3+
const EXPECTED = {
4+
'others': [
5+
{ 'path': '', 'name': 'summaries', 'desc': 'This <em>summary</em> has a link and <code>code</code>.' },
6+
],
7+
};

src/test/rustdoc-js/summaries.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#![crate_type = "lib"]
2+
#![crate_name = "summaries"]
3+
4+
//! This *summary* has a [link] and `code`.
5+
//!
6+
//! This is the second paragraph.
7+
//!
8+
//! [link]: https://example.com
9+
10+
/// This `code` will be rendered in a code tag.
11+
///
12+
/// This text should not be rendered.
13+
pub struct Sidebar;
14+
15+
/// ```text
16+
/// this block should not be rendered
17+
/// ```
18+
pub struct Sidebar2;

0 commit comments

Comments
 (0)