mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
Add new extracted option doctest ui test for result returning doctest
This commit is contained in:
parent
5864247b10
commit
21aabafbd1
11
tests/rustdoc-ui/extract-doctests-result.rs
Normal file
11
tests/rustdoc-ui/extract-doctests-result.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// Test to ensure that it generates expected output for `--output-format=doctest` command-line
|
||||
// flag.
|
||||
|
||||
//@ compile-flags:-Z unstable-options --output-format=doctest
|
||||
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
|
||||
//@ check-pass
|
||||
|
||||
//! ```
|
||||
//! let x = 12;
|
||||
//! Ok(())
|
||||
//! ```
|
1
tests/rustdoc-ui/extract-doctests-result.stdout
Normal file
1
tests/rustdoc-ui/extract-doctests-result.stdout
Normal file
@ -0,0 +1 @@
|
||||
{"format_version":2,"doctests":[{"file":"$DIR/extract-doctests-result.rs","line":8,"doctest_attributes":{"original":"","should_panic":false,"no_run":false,"ignore":"None","rust":true,"test_harness":false,"compile_fail":false,"standalone_crate":false,"error_codes":[],"edition":null,"added_css_classes":[],"unknown":[]},"original_code":"let x = 12;\nOk(())","doctest_code":{"crate_level":"#![allow(unused)]\n","code":"let x = 12;\nOk(())","wrapper":{"before":"fn main() { fn _inner() -> core::result::Result<(), impl core::fmt::Debug> {\n","after":"\n} _inner().unwrap() }","returns_result":true}},"name":"$DIR/extract-doctests-result.rs - (line 8)"}]}
|
Loading…
x
Reference in New Issue
Block a user