tests/run-make: update tests to use new API

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-06-09 15:45:57 +00:00
parent 54e704437b
commit ca95f783c1
8 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,7 @@ fn main() {
let rustc = env_var("RUSTC");
let bootstrap_cargo = env_var("BOOTSTRAP_CARGO");
let mut cmd = cmd(bootstrap_cargo);
cmd.args([
cmd.args(&[
"build",
"--manifest-path",
manifest_path.to_str().unwrap(),

View File

@ -9,5 +9,5 @@ fn main() {
.output(&out_dir)
.run();
// FIXME (GuillaumeGomez): Port the python script to Rust as well.
assert!(python_command().arg("validate_json.py").arg(&out_dir).status().unwrap().success());
python_command().arg("validate_json.py").arg(&out_dir).run();
}

View File

@ -56,5 +56,5 @@ fn main() {
.arg(&ex_dir)
.run();
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("src/lib.rs").run();
}

View File

@ -45,5 +45,5 @@ pub fn scrape(extra_args: &[&str]) {
}
rustdoc.run();
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("src/lib.rs").run();
}

View File

@ -28,5 +28,5 @@ fn main() {
std::fs::write(&test_css, test_content).unwrap();
rustdoc().output(&out_dir).input("foo.rs").arg("--theme").arg(&test_css).run();
assert!(htmldocck().arg(out_dir).arg("foo.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("foo.rs").run();
}

View File

@ -3,5 +3,5 @@
fn main() {
let out_dir = "rustdoc";
rustdoc().input("src/lib.rs").crate_name("foobar").crate_type("lib").output(&out_dir).run();
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("src/lib.rs").run();
}

View File

@ -12,5 +12,5 @@ fn main() {
.arg(&out_dir)
.run();
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("src/lib.rs").run();
}

View File

@ -12,5 +12,5 @@ fn main() {
.arg(&out_dir)
.run();
assert!(htmldocck().arg(out_dir).arg("src/lib.rs").status().unwrap().success());
htmldocck().arg(out_dir).arg("src/lib.rs").run();
}