Skip to content

Commit 562c5cc

Browse files
authored
Merge pull request #10622 from oech3/hashsum-remain
Additional hashsum cleanup
2 parents a71d6e4 + 7a8af9e commit 562c5cc

File tree

9 files changed

+3
-68
lines changed

9 files changed

+3
-68
lines changed

src/uucore/src/lib/features/checksum/validate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ impl LineInfo {
456456
/// In case of non-algo-based format, if `cached_line_format` is Some, it must take the priority
457457
/// over the detected format. Otherwise, we must set it the the detected format.
458458
/// This specific behavior is emphasized by the test
459-
/// `test_hashsum::test_check_md5sum_only_one_space`.
459+
/// `test_md5sum::test_check_md5sum_only_one_space`.
460460
fn parse(s: impl AsRef<OsStr>, cached_line_format: &mut Option<LineFormat>) -> Option<Self> {
461461
let line_bytes = os_str_as_bytes(s.as_ref()).ok()?;
462462

tests/by-util/test_b2sum.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,3 @@ fn test_check_b2sum_strict_check() {
283283
.succeeds()
284284
.stdout_only(&output);
285285
}
286-
287-
#[test]
288-
fn test_help_shows_correct_utility_name() {
289-
new_ucmd!()
290-
.arg("--help")
291-
.succeeds()
292-
.stdout_contains("Usage: b2sum")
293-
.stdout_does_not_contain("Usage: hashsum");
294-
}

tests/by-util/test_md5sum.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,3 @@ fn test_check_md5_comment_leading_space() {
800800
.stdout_contains("foo: OK")
801801
.stderr_contains("WARNING: 1 line is improperly formatted");
802802
}
803-
804-
#[test]
805-
fn test_help_shows_correct_utility_name() {
806-
// Test md5sum
807-
new_ucmd!()
808-
.arg("--help")
809-
.succeeds()
810-
.stdout_contains("Usage: md5sum")
811-
.stdout_does_not_contain("Usage: hashsum");
812-
}

tests/by-util/test_sha1sum.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,3 @@ fn test_conflicting_arg() {
152152
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
153153
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
154154
}
155-
156-
#[test]
157-
fn test_help_shows_correct_utility_name() {
158-
new_ucmd!()
159-
.arg("--help")
160-
.succeeds()
161-
.stdout_contains("Usage: sha1sum")
162-
.stdout_does_not_contain("Usage: hashsum");
163-
}

tests/by-util/test_sha224sum.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,3 @@ fn test_invalid_arg() {
108108
fn test_conflicting_arg() {
109109
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
110110
}
111-
112-
#[test]
113-
fn test_help_shows_correct_utility_name() {
114-
// Test that help output shows the actual utility name instead of "hashsum"
115-
new_ucmd!()
116-
.arg("--help")
117-
.succeeds()
118-
.stdout_contains("Usage: sha224sum")
119-
.stdout_does_not_contain("Usage: hashsum");
120-
}

tests/by-util/test_sha256sum.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,3 @@ fn test_check_sha256_binary() {
169169
.no_stderr()
170170
.stdout_is("binary.png: OK\n");
171171
}
172-
173-
#[test]
174-
fn test_help_shows_correct_utility_name() {
175-
new_ucmd!()
176-
.arg("--help")
177-
.succeeds()
178-
.stdout_contains("Usage: sha256sum")
179-
.stdout_does_not_contain("Usage: hashsum");
180-
}

tests/by-util/test_sha384sum.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,3 @@ fn test_conflicting_arg() {
110110
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
111111
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
112112
}
113-
114-
#[test]
115-
fn test_help_shows_correct_utility_name() {
116-
new_ucmd!()
117-
.arg("--help")
118-
.succeeds()
119-
.stdout_contains("Usage: sha384sum")
120-
.stdout_does_not_contain("Usage: hashsum");
121-
}

tests/by-util/test_sha512sum.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,3 @@ fn test_conflicting_arg() {
110110
new_ucmd!().arg("--tag").arg("--check").fails_with_code(1);
111111
new_ucmd!().arg("--tag").arg("--text").fails_with_code(1);
112112
}
113-
114-
#[test]
115-
fn test_help_shows_correct_utility_name() {
116-
new_ucmd!()
117-
.arg("--help")
118-
.succeeds()
119-
.stdout_contains("Usage: sha512sum")
120-
.stdout_does_not_contain("Usage: hashsum");
121-
}

util/build-gnu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
213213
# watchers before initial read, so no exact equivalent exists. We break at
214214
# watch_with_parent as the closest semantic match. -iex suppresses Rust debug
215215
# script auto-load warnings that would cause the test to skip.
216-
"${SED}" -i \
216+
sed -i \
217217
-e "s|break_src=\"\$abs_top_srcdir/src/tail.c\"|break_src=\"${path_UUTILS}/src/uu/tail/src/follow/watch.rs\"|" \
218218
-e 's|break_line=$(grep -n ^tail_forever_inotify "$break_src")|break_line=$(grep -n "watcher_rx.watch_with_parent" "$break_src")|' \
219219
-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\
316316
echo "n_stat2 = \$n_stat2"\n\
317317
test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh
318318

319-
# no need to replicate this output with hashsum
319+
# for clap
320320
sed -i -e "s|Try 'md5sum --help' for more information.\\\n||" tests/cksum/md5sum.pl
321321

322322
# Our ls command always outputs ANSI color codes prepended with a zero. However,

0 commit comments

Comments
 (0)