Skip to content

Commit 2b9e697

Browse files
authored
Merge branch 'main' into rm-one-file-system
2 parents 0c3760d + 2cfed63 commit 2b9e697

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1539
-924
lines changed

Cargo.lock

Lines changed: 80 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deny.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ highlight = "all"
5454
# introduces it.
5555
# spell-checker: disable
5656
skip = [
57-
# various crates
57+
# windows
58+
{ name = "windows-core", version = "0.52.0" },
59+
# dns-lookup
5860
{ name = "windows-sys", version = "0.48.0" },
5961
# mio, nu-ansi-term, socket2
6062
{ name = "windows-sys", version = "0.52.0" },
@@ -76,7 +78,7 @@ skip = [
7678
{ name = "windows_x86_64_msvc", version = "0.48.0" },
7779
# kqueue-sys, onig
7880
{ name = "bitflags", version = "1.3.2" },
79-
# ansi-width, console, os_display
81+
# ansi-width
8082
{ name = "unicode-width", version = "0.1.13" },
8183
# filedescriptor, utmp-classic
8284
{ name = "thiserror", version = "1.0.69" },

src/uu/cat/src/cat.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ fn write_tab_to_end<W: Write>(mut in_buf: &[u8], writer: &mut W) -> usize {
644644
}
645645
None => {
646646
writer.write_all(in_buf).unwrap();
647-
return in_buf.len();
647+
return in_buf.len() + count;
648648
}
649649
};
650650
}
@@ -688,6 +688,20 @@ fn write_end_of_line<W: Write>(
688688
mod tests {
689689
use std::io::{BufWriter, stdout};
690690

691+
#[test]
692+
fn test_write_tab_to_end_with_newline() {
693+
let mut writer = BufWriter::with_capacity(1024 * 64, stdout());
694+
let in_buf = b"a\tb\tc\n";
695+
assert_eq!(super::write_tab_to_end(in_buf, &mut writer), 5);
696+
}
697+
698+
#[test]
699+
fn test_write_tab_to_end_no_newline() {
700+
let mut writer = BufWriter::with_capacity(1024 * 64, stdout());
701+
let in_buf = b"a\tb\tc";
702+
assert_eq!(super::write_tab_to_end(in_buf, &mut writer), 5);
703+
}
704+
691705
#[test]
692706
fn test_write_nonprint_to_end_new_line() {
693707
let mut writer = BufWriter::with_capacity(1024 * 64, stdout());

src/uu/dd/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ clap = { workspace = true }
2121
gcd = { workspace = true }
2222
libc = { workspace = true }
2323
uucore = { workspace = true, features = ["format", "quoting-style"] }
24+
thiserror = { workspace = true }
2425

2526
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
2627
signal-hook = { workspace = true }

0 commit comments

Comments
 (0)