rust/tests/run-make/rustdoc-test-args/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
404 B
Rust
Raw Normal View History

use std::iter;
2024-03-23 09:48:44 -05:00
use std::path::Path;
2024-07-17 08:31:38 -05:00
use run_make_support::{rfs, rustdoc};
2024-03-23 09:48:44 -05:00
fn generate_a_lot_of_cfgs(path: &Path) {
let content = iter::repeat("--cfg=a\n").take(100_000).collect::<String>();
rfs::write(path, content.as_bytes());
2024-03-23 09:48:44 -05:00
}
fn main() {
let arg_file = Path::new("args");
2024-03-23 09:48:44 -05:00
generate_a_lot_of_cfgs(&arg_file);
rustdoc().input("foo.rs").arg_file(&arg_file).arg("--test").run();
2024-03-23 09:48:44 -05:00
}