1
0
Fork 0
firefox/third_party/rust/tokio/tests/process_arg0.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

13 lines
318 B
Rust

#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", unix))]
use tokio::process::Command;
#[tokio::test]
async fn arg0() {
let mut cmd = Command::new("sh");
cmd.arg0("test_string").arg("-c").arg("echo $0");
let output = cmd.output().await.unwrap();
assert_eq!(output.stdout, b"test_string\n");
}