Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coreutils (uutils)
# * see the repository LICENSE, README, and CONTRIBUTING files for more information

# spell-checker:ignore (libs) bigdecimal datetime foldhash serde gethostid kqueue libcrypto libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs interner getauxval
# spell-checker:ignore (libs) bigdecimal datetime filedescriptor foldhash serde gethostid kqueue libcrypto libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs interner getauxval

[package]
name = "coreutils"
Expand Down Expand Up @@ -418,6 +418,7 @@ dns-lookup = { version = "3.0.0" }
dunce = "1.0.4"
exacl = "0.13.0"
file_diff = "1.0.0"
filedescriptor = "0.8.3"
filetime = "0.2.29"
foldhash = "0.2.0"
fs_extra = "1.3.0"
Expand Down Expand Up @@ -575,6 +576,7 @@ ignored = ["clap", "fluent", "libstdbuf"]
clap.workspace = true
clap_complete = { workspace = true, optional = true }
clap_mangen = { workspace = true, optional = true }
filedescriptor.workspace = true
fluent-syntax = { workspace = true, optional = true }
itertools.workspace = true
jiff = { workspace = true, optional = true }
Expand Down Expand Up @@ -753,6 +755,9 @@ phf_codegen.workspace = true
[lints]
workspace = true

[patch.crates-io]
filedescriptor = { git = "https://github.com/wezterm/wezterm.git", rev = "21ad43049bf1f03469fb1e00447c91cdf15d1e98" }

[[bin]]
name = "coreutils"
path = "src/bin/coreutils.rs"
Expand Down
14 changes: 5 additions & 9 deletions tests/by-util/test_tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1655,17 +1655,13 @@ fn test_broken_pipe_no_error() {
fn test_stdin_is_socket() {
use std::io::Write as _;

let (fd1, fd2) = rustix::net::socketpair(
rustix::net::AddressFamily::UNIX,
rustix::net::SocketType::STREAM,
rustix::net::SocketFlags::empty(),
None,
)
.unwrap();
std::fs::File::from(fd1).write_all(b"::").unwrap();
let (mut writer, reader) = filedescriptor::socketpair().unwrap();
writer.write_all(b"::").unwrap();
drop(writer);

new_ucmd!()
.args(&[":", ";"])
.set_stdin(fd2)
.set_stdin(reader)
.succeeds()
.stdout_is(";;");
}
Loading