Skip to content

Commit 5adedd7

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

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/rustdoc-ui/extract-doctests.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
6+
//@ check-pass
7+
8+
//! ```ignore (checking attributes)
9+
//! let x = 12;
10+
//! let y = 14;
11+
//! ```
12+
//!
13+
//! ```edition2018,compile_fail
14+
//! let
15+
//! ```
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"filename":"$DIR/extract-doctests.rs","line":8,"langstr":{"original":"ignore (checking attributes)","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":"$DIR/extract-doctests.rs","line":13,"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)