Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: smol-rs/async-process
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4e8dfc0e4dbbf03903fb95fd6deeae61e0ed167f
Choose a base ref
..
head repository: smol-rs/async-process
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c7a26b9f1d21ff8bac691b71b4b64483b13e5710
Choose a head ref
Showing with 10 additions and 10 deletions.
  1. +10 −10 tests/std.rs
20 changes: 10 additions & 10 deletions tests/std.rs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ use futures_lite::{future, prelude::*};
fn smoke() {
future::block_on(async {
let p = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 0"]).spawn()
Command::new("cmd").args(["/C", "exit 0"]).spawn()
} else {
Command::new("true").spawn()
};
@@ -32,7 +32,7 @@ fn smoke_failure() {
fn exit_reported_right() {
future::block_on(async {
let p = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn()
Command::new("cmd").args(["/C", "exit 1"]).spawn()
} else {
Command::new("false").spawn()
};
@@ -84,7 +84,7 @@ fn stdout_works() {
future::block_on(async {
if cfg!(target_os = "windows") {
let mut cmd = Command::new("cmd");
cmd.args(&["/C", "echo foobar"]).stdout(Stdio::piped());
cmd.args(["/C", "echo foobar"]).stdout(Stdio::piped());
assert_eq!(run_output(cmd).await, "foobar\r\n");
} else {
let mut cmd = Command::new("echo");
@@ -142,7 +142,7 @@ fn test_process_status() {
future::block_on(async {
let mut status = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "exit 1"])
.args(["/C", "exit 1"])
.status()
.await
.unwrap()
@@ -153,7 +153,7 @@ fn test_process_status() {

status = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "exit 0"])
.args(["/C", "exit 0"])
.status()
.await
.unwrap()
@@ -186,7 +186,7 @@ fn test_process_output_output() {
stderr,
} = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "echo hello"])
.args(["/C", "echo hello"])
.output()
.await
.unwrap()
@@ -210,7 +210,7 @@ fn test_process_output_error() {
stderr,
} = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "mkdir ."])
.args(["/C", "mkdir ."])
.output()
.await
.unwrap()
@@ -228,7 +228,7 @@ fn test_process_output_error() {
fn test_finish_once() {
future::block_on(async {
let mut prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
Command::new("cmd").args(["/C", "exit 1"]).spawn().unwrap()
} else {
Command::new("false").spawn().unwrap()
};
@@ -240,7 +240,7 @@ fn test_finish_once() {
fn test_finish_twice() {
future::block_on(async {
let mut prog = if cfg!(target_os = "windows") {
Command::new("cmd").args(&["/C", "exit 1"]).spawn().unwrap()
Command::new("cmd").args(["/C", "exit 1"]).spawn().unwrap()
} else {
Command::new("false").spawn().unwrap()
};
@@ -254,7 +254,7 @@ fn test_wait_with_output_once() {
future::block_on(async {
let prog = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "echo hello"])
.args(["/C", "echo hello"])
.stdout(Stdio::piped())
.spawn()
.unwrap()