diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-13 21:52:23 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-24 15:37:24 +0000 |
| commit | 1f2178b9e7b43f4efe549e19889eafeec9061e8c (patch) | |
| tree | bb074345ed382ca6df912b1d61e24a38fdcd4836 /tests/run-make/rustdoc-test-args | |
| parent | 6a92312a1eaf5d9cffe3bdf9aaecbfdf8e2e35d9 (diff) | |
| download | rust-1f2178b9e7b43f4efe549e19889eafeec9061e8c.tar.gz rust-1f2178b9e7b43f4efe549e19889eafeec9061e8c.zip | |
Rework rmake support library to have a weakly-typed API with helper methods
Diffstat (limited to 'tests/run-make/rustdoc-test-args')
| -rw-r--r-- | tests/run-make/rustdoc-test-args/rmake.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/run-make/rustdoc-test-args/rmake.rs b/tests/run-make/rustdoc-test-args/rmake.rs index 808d13928eb..c8edfb6370e 100644 --- a/tests/run-make/rustdoc-test-args/rmake.rs +++ b/tests/run-make/rustdoc-test-args/rmake.rs @@ -1,8 +1,8 @@ extern crate run_make_support; -use run_make_support::{out_dir, rustdoc}; -use std::{fs, iter}; +use run_make_support::{rustdoc, tmp_dir}; use std::path::Path; +use std::{fs, iter}; fn generate_a_lot_of_cfgs(path: &Path) { let content = iter::repeat("--cfg=a\n").take(100_000).collect::<String>(); @@ -10,9 +10,8 @@ fn generate_a_lot_of_cfgs(path: &Path) { } fn main() { - let arg_file = out_dir().join("args"); + let arg_file = tmp_dir().join("args"); generate_a_lot_of_cfgs(&arg_file); - let arg_file = format!("@{}", arg_file.display()); - rustdoc().arg("--test").arg(&arg_file).arg("foo.rs").run(); + rustdoc().out_dir(tmp_dir()).input("foo.rs").arg_file(&arg_file).arg("--test").run(); } |
