Skip to content

Commit 826054d

Browse files
Add UI test for --extra-doctests command-line flag
1 parent 5afc1c5 commit 826054d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/rustdoc-ui/extract-doctests.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Test to ensure that it generates expected output for `--extract-doctests` command-line
2+
// flag.
3+
4+
//@ compile-flags:-Z unstable-options --extract-doctests
5+
//@ check-pass
6+
7+
//! ```ignore
8+
//! let x = 12;
9+
//! let y = 14;
10+
//! ```
11+
//!
12+
//! ```edition2018,compile_fail
13+
//! let
14+
//! ```
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"filename":"tests/rustdoc-ui/extract-doctests.rs","line":7,"langstr":{"original":"ignore","should_panic":false,"no_run":false,"ignore":"All","rust":true,"test_harness":false,"compile_fail":false,"standalone_crate":false,"error_codes":[],"edition":null,"added_classes":[],"unknown":[]},"text":"let x = 12;\nlet y = 14;"},{"filename":"tests/rustdoc-ui/extract-doctests.rs","line":12,"langstr":{"original":"edition2018,compile_fail","should_panic":false,"no_run":true,"ignore":"None","rust":true,"test_harness":false,"compile_fail":true,"standalone_crate":false,"error_codes":[],"edition":"2018","added_classes":[],"unknown":[]},"text":"let"}]

0 commit comments

Comments
 (0)