2024-06-06 18:47:00 +00:00
|
|
|
use std::iter;
|
2024-03-23 14:48:44 +00:00
|
|
|
use std::path::Path;
|
|
|
|
|
2024-07-17 13:31:38 +00:00
|
|
|
use run_make_support::{rfs, rustdoc};
|
2024-07-28 22:13:50 +00:00
|
|
|
|
2024-03-23 14:48:44 +00:00
|
|
|
fn generate_a_lot_of_cfgs(path: &Path) {
|
|
|
|
let content = iter::repeat("--cfg=a\n").take(100_000).collect::<String>();
|
2024-07-17 12:42:06 +00:00
|
|
|
rfs::write(path, content.as_bytes());
|
2024-03-23 14:48:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2024-06-06 19:34:34 +00:00
|
|
|
let arg_file = Path::new("args");
|
2024-03-23 14:48:44 +00:00
|
|
|
generate_a_lot_of_cfgs(&arg_file);
|
|
|
|
|
2024-06-06 19:34:34 +00:00
|
|
|
rustdoc().input("foo.rs").arg_file(&arg_file).arg("--test").run();
|
2024-03-23 14:48:44 +00:00
|
|
|
}
|