mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-12 23:13:15 +00:00
Add rustdoc-js test
Finally!
This commit is contained in:
parent
07e9426efb
commit
b9035194c0
@ -1,2 +1,2 @@
|
||||
/// Foo
|
||||
/// Docs for Foo
|
||||
pub struct Foo;
|
||||
|
7
src/test/rustdoc-js/summaries.js
Normal file
7
src/test/rustdoc-js/summaries.js
Normal file
@ -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>.' },
|
||||
],
|
||||
};
|
18
src/test/rustdoc-js/summaries.rs
Normal file
18
src/test/rustdoc-js/summaries.rs
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user