2021-11-26 23:03:16 +00:00
|
|
|
#![allow(rustdoc::invalid_rust_codeblocks)]
|
|
|
|
|
2018-12-15 21:25:50 +00:00
|
|
|
// @has bad_codeblock_syntax/fn.foo.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '\_'
|
2018-12-15 21:25:50 +00:00
|
|
|
/// ```
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn foo() {}
|
|
|
|
|
|
|
|
// @has bad_codeblock_syntax/fn.bar.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '`baz::foobar`'
|
2018-12-15 21:25:50 +00:00
|
|
|
/// ```
|
|
|
|
/// `baz::foobar`
|
|
|
|
/// ```
|
|
|
|
pub fn bar() {}
|
|
|
|
|
|
|
|
// @has bad_codeblock_syntax/fn.quux.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '\_'
|
2018-12-15 21:25:50 +00:00
|
|
|
/// ```rust
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn quux() {}
|
|
|
|
|
|
|
|
// @has bad_codeblock_syntax/fn.ok.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '\_'
|
2018-12-15 21:25:50 +00:00
|
|
|
/// ```text
|
|
|
|
/// \_
|
|
|
|
/// ```
|
|
|
|
pub fn ok() {}
|
2020-01-15 22:42:04 +00:00
|
|
|
|
|
|
|
// @has bad_codeblock_syntax/fn.escape.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '\_ <script>alert("not valid Rust");</script>'
|
2020-01-15 22:42:04 +00:00
|
|
|
/// ```
|
|
|
|
/// \_
|
|
|
|
/// <script>alert("not valid Rust");</script>
|
|
|
|
/// ```
|
|
|
|
pub fn escape() {}
|
2020-01-17 23:44:44 +00:00
|
|
|
|
|
|
|
// @has bad_codeblock_syntax/fn.unterminated.html
|
2020-08-21 14:38:35 +00:00
|
|
|
// @has - '//*[@class="docblock"]' '"unterminated'
|
2020-01-17 23:44:44 +00:00
|
|
|
/// ```
|
|
|
|
/// "unterminated
|
|
|
|
/// ```
|
|
|
|
pub fn unterminated() {}
|