Skip to content

Commit

Permalink
tests/csplit: use printf instead of echo -n for maximum portability w…
Browse files Browse the repository at this point in the history
…ith all UNIX systems
  • Loading branch information
fuad1502 committed Jan 7, 2025
1 parent 5f8d357 commit 75ff8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/by-util/test_csplit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ fn create_named_pipe_with_writer(path: &str, data: &str) -> std::process::Child
nix::unistd::mkfifo(path, nix::sys::stat::Mode::S_IRWXU).unwrap();
std::process::Command::new("sh")
.arg("-c")
.arg(format!("echo -n '{}' > {path}", data))
.arg(format!("printf '{}' > {path}", data))
.spawn()
.unwrap()
}
Expand Down

0 comments on commit 75ff8ac

Please sign in to comment.