1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

cksum: implement trivial --tag flag

This commit is contained in:
Ben Wiederhake 2024-03-02 03:14:13 +01:00
parent edb1eb0a76
commit 7b219aee63
2 changed files with 30 additions and 0 deletions

View file

@ -140,6 +140,17 @@ fn test_repeated_flags() {
.stdout_is_fixture("md5_single_file.expected");
}
#[test]
fn test_tag_after_untagged() {
new_ucmd!()
.arg("--untagged")
.arg("--tag")
.arg("-a=md5")
.arg("lorem_ipsum.txt")
.succeeds()
.stdout_is_fixture("md5_single_file.expected");
}
#[test]
fn test_algorithm_single_file() {
for algo in ALGOS {
@ -220,6 +231,17 @@ fn test_untagged_algorithm_single_file() {
}
}
#[test]
fn test_untagged_algorithm_after_tag() {
new_ucmd!()
.arg("--tag")
.arg("--untagged")
.arg("--algorithm=md5")
.arg("lorem_ipsum.txt")
.succeeds()
.stdout_is_fixture("untagged/md5_single_file.expected");
}
#[test]
fn test_untagged_algorithm_multiple_files() {
for algo in ALGOS {