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