We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5467af2 commit 08af772Copy full SHA for 08af772
tests/run-make/rustdoc-test-args/foo.rs
@@ -0,0 +1,3 @@
1
+//! ```
2
+//! let x = 12;
3
tests/run-make/rustdoc-test-args/rmake.rs
@@ -0,0 +1,21 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustdoc};
4
+use std::{fs, iter};
5
+use std::path::Path;
6
7
+fn generate_a_lot_of_cfgs(path: &Path) {
8
+ let content = iter::repeat("--cfg=a\n").take(75_000).collect::<String>();
9
+ fs::write(path, content.as_bytes()).expect("failed to create args file");
10
+}
11
12
+fn main() -> Result<(), ()> {
13
+ let arg_file = out_dir().join("args");
14
+ generate_a_lot_of_cfgs(&arg_file);
15
16
+ let arg_file = format!("@{}", arg_file.display());
17
+ if !rustdoc().arg("--test").arg(&arg_file).arg("foo.rs").run().status.success() {
18
+ return Err(());
19
+ }
20
+ Ok(())
21
0 commit comments