Additional hashsum cleanup

This commit is contained in:
oech3
2026-02-01 00:44:36 +09:00
parent eabb527a24
commit 7a8af9e69d
9 changed files with 3 additions and 68 deletions
@@ -456,7 +456,7 @@ impl LineInfo {
/// In case of non-algo-based format, if `cached_line_format` is Some, it must take the priority
/// over the detected format. Otherwise, we must set it the the detected format.
/// This specific behavior is emphasized by the test
/// `test_hashsum::test_check_md5sum_only_one_space`.
/// `test_md5sum::test_check_md5sum_only_one_space`.
fn parse(s: impl AsRef<OsStr>, cached_line_format: &mut Option<LineFormat>) -> Option<Self> {
let line_bytes = os_str_as_bytes(s.as_ref()).ok()?;
-9
View File
@@ -283,12 +283,3 @@ fn test_check_b2sum_strict_check() {
.succeeds()
.stdout_only(&output);
}
#[test]
fn test_help_shows_correct_utility_name() {
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: b2sum")
.stdout_does_not_contain("Usage: hashsum");
}
-10
View File
@@ -800,13 +800,3 @@ fn test_check_md5_comment_leading_space() {
.stdout_contains("foo: OK")
.stderr_contains("WARNING: 1 line is improperly formatted");
}
#[test]
fn test_help_shows_correct_utility_name() {
// Test md5sum
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: md5sum")
.stdout_does_not_contain("Usage: hashsum");
}
-9
View File
@@ -152,12 +152,3 @@ fn test_conflicting_arg() {
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
}
#[test]
fn test_help_shows_correct_utility_name() {
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: sha1sum")
.stdout_does_not_contain("Usage: hashsum");
}
-10
View File
@@ -108,13 +108,3 @@ fn test_invalid_arg() {
fn test_conflicting_arg() {
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
}
#[test]
fn test_help_shows_correct_utility_name() {
// Test that help output shows the actual utility name instead of "hashsum"
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: sha224sum")
.stdout_does_not_contain("Usage: hashsum");
}
-9
View File
@@ -169,12 +169,3 @@ fn test_check_sha256_binary() {
.no_stderr()
.stdout_is("binary.png: OK\n");
}
#[test]
fn test_help_shows_correct_utility_name() {
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: sha256sum")
.stdout_does_not_contain("Usage: hashsum");
}
-9
View File
@@ -110,12 +110,3 @@ fn test_conflicting_arg() {
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
}
#[test]
fn test_help_shows_correct_utility_name() {
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: sha384sum")
.stdout_does_not_contain("Usage: hashsum");
}
-9
View File
@@ -110,12 +110,3 @@ fn test_conflicting_arg() {
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
}
#[test]
fn test_help_shows_correct_utility_name() {
new_ucmd!()
.arg("--help")
.succeeds()
.stdout_contains("Usage: sha512sum")
.stdout_does_not_contain("Usage: hashsum");
}
+2 -2
View File
@@ -213,7 +213,7 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
# watchers before initial read, so no exact equivalent exists. We break at
# watch_with_parent as the closest semantic match. -iex suppresses Rust debug
# script auto-load warnings that would cause the test to skip.
"${SED}" -i \
sed -i \
-e "s|break_src=\"\$abs_top_srcdir/src/tail.c\"|break_src=\"${path_UUTILS}/src/uu/tail/src/follow/watch.rs\"|" \
-e 's|break_line=$(grep -n ^tail_forever_inotify "$break_src")|break_line=$(grep -n "watcher_rx.watch_with_parent" "$break_src")|' \
-e 's|gdb -nx --batch-silent|gdb -nx --batch-silent -iex "set auto-load no"|g' \
@@ -316,7 +316,7 @@ echo "n_stat1 = \$n_stat1"\n\
echo "n_stat2 = \$n_stat2"\n\
test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh
# no need to replicate this output with hashsum
# for clap
sed -i -e "s|Try 'md5sum --help' for more information.\\\n||" tests/cksum/md5sum.pl
# Our ls command always outputs ANSI color codes prepended with a zero. However,