Skip to content
Merged
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
86 changes: 36 additions & 50 deletions Cargo.lock

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

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

# spell-checker:ignore (libs) bigdecimal datetime fundu gethostid kqueue libselinux mangen memmap sed uuhelp
# spell-checker:ignore (libs) mangen sed

[package]
name = "sed"
Expand All @@ -16,8 +16,7 @@ repository = "https://github.com/uutils/sed"
readme = "README.md"
keywords = ["sed", "uutils", "cross-platform", "cli", "utility"]
categories = ["command-line-utilities"]
rust-version = "1.70.0"
edition = "2021"
edition = "2024"

build = "build.rs"

Expand All @@ -30,46 +29,46 @@ feat_common_core = [
]

[workspace.dependencies]
uucore = "0.0.30"
bytesize = "2.0.0"
chrono = { version = "0.4.37", default-features = false, features = [
"clock",
] }
clap = { version = "4.4", features = ["wrap_help", "cargo"] }
clap_complete = "4.5"
clap_mangen = "0.2"
regex = "1.10.4"
sysinfo = "0.35"
libc = "0.2.153"
once_cell = "1.21"
phf = "0.11.2"
phf_codegen = "0.11.2"
rand = { version = "0.9", features = ["small_rng"] }
regex = "1.10.4"
sysinfo = "0.35"
tempfile = "3.10.1"
textwrap = { version = "0.16.1", features = ["terminal_size"] }
uucore = "0.0.30"
xattr = "1.3.1"
tempfile = "3.10.1"
rand = { version = "0.9", features = ["small_rng"] }
bytesize = "2.0.0"
chrono = { version = "0.4.37", default-features = false, features = [
"clock",
] }

[dependencies]
clap = { workspace = true }
clap_complete = { workspace = true }
clap_mangen = { workspace = true }
uucore = { workspace = true }
phf = { workspace = true }
textwrap = { workspace = true }
sysinfo = { workspace = true }
textwrap = { workspace = true }
uucore = { workspace = true }

ctor = "0.4.1"
sed = { optional = true, version = "0.0.1", package = "uu_sed", path = "src/uu/sed" }
uutests = "0.0.30"
ctor = "0.4.1"

[dev-dependencies]
chrono = { workspace = true }
libc = { workspace = true }
pretty_assertions = "1"
rand = { workspace = true }
regex = { workspace = true }
tempfile = { workspace = true }
libc = { workspace = true }
rand = { workspace = true }
uucore = { workspace = true, features = ["entries", "process", "signals"] }
chrono = { workspace = true }

[target.'cfg(unix)'.dev-dependencies]
xattr = { workspace = true }
Expand Down
4 changes: 3 additions & 1 deletion src/bin/uudoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ fn main() -> io::Result<()> {

if tldr_zip.is_none() {
println!("Warning: No tldr archive found, so the documentation will not include examples.");
println!("To include examples in the documentation, download the tldr archive and put it in the docs/ folder.");
println!(
"To include examples in the documentation, download the tldr archive and put it in the docs/ folder."
);
println!();
println!(" curl https://tldr.sh/assets/tldr.zip -o docs/tldr.zip");
println!();
Expand Down
4 changes: 2 additions & 2 deletions src/uu/sed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "uu_sed"
version = "0.0.1"
edition = "2021"
edition = "2024"
authors = ["uutils developers"]
license = "MIT"
description = "sed ~ (uutils) stream editor for filtering/transforming text"
Expand All @@ -13,11 +13,11 @@ categories = ["command-line-utilities"]


[dependencies]
uucore = { workspace = true }
clap = { workspace = true }
once_cell = { workspace = true }
regex = { workspace = true }
tempfile = { workspace = true }
uucore = { workspace = true }

[lib]
path = "src/sed.rs"
Expand Down
21 changes: 12 additions & 9 deletions src/uu/sed/src/delimited_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,10 @@ mod tests {
fn errors_on_backslash_delimiter() {
let (lines, mut line) = make_providers("\\bad");
let err = parse_regex(&lines, &mut line).unwrap_err();
assert!(err
.to_string()
.contains("\\ cannot be used as a string delimiter"));
assert!(
err.to_string()
.contains("\\ cannot be used as a string delimiter")
);
}

#[test]
Expand Down Expand Up @@ -899,17 +900,19 @@ mod tests {
fn errors_on_unterminated_transliteration() {
let (lines, mut line) = make_providers("/unterminated");
let err = parse_transliteration(&lines, &mut line).unwrap_err();
assert!(err
.to_string()
.contains("unterminated transliteration string"));
assert!(
err.to_string()
.contains("unterminated transliteration string")
);
}

#[test]
fn errors_on_esc_at_tr_eol() {
let (lines, mut line) = make_providers("/foo\\");
let err = parse_transliteration(&lines, &mut line).unwrap_err();
assert!(err
.to_string()
.contains("unterminated transliteration string"));
assert!(
err.to_string()
.contains("unterminated transliteration string")
);
}
}
Loading
Loading