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

cksum: stops when one of given files doesn't exist #5809 (#5820)

* cksum: stops when one of given files doesn't exist #5809

* removed printld  cksum: stops when one of given files doesn't exist #5809

* formatting the code cksum: stops when one of given files doesn't exist #5809

* formatting the code cksum: stops when one of given files doesn't exist #5809

* set exist status cksum: stops when one of given files doesn't exist #5809

* code quality formatting issue cksum: stops when one of given files doesn't exist #5809

* tertsdiepraam idea cksum: stops when one of given files doesn't exist #5809

* one new test case and deleted duplicate show cksum: stops when one of given files doesn't exist #5809

* formatting the test cases cksum: stops when one of given files doesn't exist #5809

* Revert "formatting the test cases cksum: stops when one of given files doesn't exist #5809"

This reverts commit 8c382f1e8fa4e9ba3fc0f4fc05ee2fb58ef9dbfd.

* reverting the changes and committing again due to a mistake cksum: stops when one of given files doesn't exist #5809

---------

Co-authored-by: biplab5464 <biplab5464@outlook.com>
This commit is contained in:
Biplab Mochan Gartia 2024-01-15 14:07:56 +05:30 committed by GitHub
parent 6d5f2e4129
commit 076b905513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 2 deletions

View file

@ -80,6 +80,22 @@ fn test_nonexisting_file() {
.stderr_contains(format!("cksum: {file_name}: No such file or directory"));
}
#[test]
fn test_one_nonexisting_file() {
let (at, mut ucmd) = at_and_ucmd!();
at.touch("abc.txt");
at.touch("xyz.txt");
ucmd.arg("abc.txt")
.arg("asdf.txt")
.arg("xyz.txt")
.fails()
.stdout_contains_line("4294967295 0 xyz.txt")
.stderr_contains("asdf.txt: No such file or directory")
.stdout_contains_line("4294967295 0 abc.txt");
}
// Make sure crc is correct for files larger than 32 bytes
// but <128 bytes (1 fold pclmul) // spell-checker:disable-line
#[test]