about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-05 16:26:35 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-05-06 09:16:35 +0200
commit823b423d4c789a2282dc6d25fd8182e845e351ff (patch)
tree49c646c3932f8dadde9860b3a23b12b1f5e3b33f /tests
parentc04d09a76be381f2058a0421c745a1a697957969 (diff)
downloadrust-823b423d4c789a2282dc6d25fd8182e845e351ff.tar.gz
rust-823b423d4c789a2282dc6d25fd8182e845e351ff.zip
Add new `output` method to `Rustc` and `Rustdoc` types
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/doctests-runtool/rmake.rs2
-rw-r--r--tests/run-make/exit-code/rmake.rs2
-rw-r--r--tests/run-make/repr128-dwarf/rmake.rs2
-rw-r--r--tests/run-make/rustdoc-determinism/rmake.rs23
-rw-r--r--tests/run-make/wasm-abi/rmake.rs2
5 files changed, 16 insertions, 15 deletions
diff --git a/tests/run-make/doctests-runtool/rmake.rs b/tests/run-make/doctests-runtool/rmake.rs
index 16451409528..6f89bf23b47 100644
--- a/tests/run-make/doctests-runtool/rmake.rs
+++ b/tests/run-make/doctests-runtool/rmake.rs
@@ -19,7 +19,7 @@ fn main() {
     let run_tool_binary = run_tool.join("runtool");
 
     rustc().input("t.rs").crate_type("rlib").run();
-    rustc().input("runtool.rs").arg("-o").arg(&run_tool_binary).run();
+    rustc().input("runtool.rs").output(&run_tool_binary).run();
 
     rustdoc()
         .input(current_dir().unwrap().join("t.rs"))
diff --git a/tests/run-make/exit-code/rmake.rs b/tests/run-make/exit-code/rmake.rs
index b1143153d0a..76d7777581b 100644
--- a/tests/run-make/exit-code/rmake.rs
+++ b/tests/run-make/exit-code/rmake.rs
@@ -15,7 +15,7 @@ fn main() {
         .arg("compile-error.rs")
         .run_fail_assert_exit_code(101);
 
-    rustdoc().arg("success.rs").arg("-o").arg(tmp_dir().join("exit-code")).run();
+    rustdoc().arg("success.rs").output(tmp_dir().join("exit-code")).run();
 
     rustdoc().arg("--invalid-arg-foo").run_fail_assert_exit_code(1);
 
diff --git a/tests/run-make/repr128-dwarf/rmake.rs b/tests/run-make/repr128-dwarf/rmake.rs
index d734b2add79..fd5dd810444 100644
--- a/tests/run-make/repr128-dwarf/rmake.rs
+++ b/tests/run-make/repr128-dwarf/rmake.rs
@@ -10,7 +10,7 @@ use std::rc::Rc;
 
 fn main() {
     let output = tmp_dir().join("repr128");
-    rustc().input("main.rs").arg("-o").arg(&output).arg("-Cdebuginfo=2").run();
+    rustc().input("main.rs").output(&output).arg("-Cdebuginfo=2").run();
     // Mach-O uses packed debug info
     let dsym_location = output
         .with_extension("dSYM")
diff --git a/tests/run-make/rustdoc-determinism/rmake.rs b/tests/run-make/rustdoc-determinism/rmake.rs
index 38ae75199fd..09097d4507d 100644
--- a/tests/run-make/rustdoc-determinism/rmake.rs
+++ b/tests/run-make/rustdoc-determinism/rmake.rs
@@ -1,18 +1,19 @@
-use run_make_support::{diff, rustc, rustdoc, tmp_dir};
+// Assert that the search index is generated deterministically, regardless of the
+// order that crates are documented in.
+
+use run_make_support::{diff, rustdoc, tmp_dir};
 
-/// Assert that the search index is generated deterministically, regardless of the
-/// order that crates are documented in.
 fn main() {
-    let dir_first = tmp_dir().join("first");
-    rustdoc().out_dir(&dir_first).input("foo.rs").run();
-    rustdoc().out_dir(&dir_first).input("bar.rs").run();
+    let foo_first = tmp_dir().join("foo_first");
+    rustdoc().input("foo.rs").output(&foo_first).run();
+    rustdoc().input("bar.rs").output(&foo_first).run();
 
-    let dir_second = tmp_dir().join("second");
-    rustdoc().out_dir(&dir_second).input("bar.rs").run();
-    rustdoc().out_dir(&dir_second).input("foo.rs").run();
+    let bar_first = tmp_dir().join("bar_first");
+    rustdoc().input("bar.rs").output(&bar_first).run();
+    rustdoc().input("foo.rs").output(&bar_first).run();
 
     diff()
-        .expected_file(dir_first.join("search-index.js"))
-        .actual_file(dir_second.join("search-index.js"))
+        .expected_file(foo_first.join("search-index.js"))
+        .actual_file(bar_first.join("search-index.js"))
         .run();
 }
diff --git a/tests/run-make/wasm-abi/rmake.rs b/tests/run-make/wasm-abi/rmake.rs
index 01f2b274423..a2dcafbbe0f 100644
--- a/tests/run-make/wasm-abi/rmake.rs
+++ b/tests/run-make/wasm-abi/rmake.rs
@@ -25,7 +25,7 @@ fn run(file: &Path, method: &str, expected_output: &str) {
         .arg("--invoke")
         .arg(method)
         .arg(file)
-        .command_output()
+        .output()
         .unwrap();
     assert!(output.status.success());
     assert_eq!(expected_output, String::from_utf8_lossy(&output.stdout));