Summary of the change:
* Move the common code into checksum
* Create a structure HashAlgorithm to handle the algorithm (instead of the 3 variables)
* Use the same function for cksum & hashsum for --check (perform_checksum_validation)
* Use the same for function for the hash generation (digest_reader)
* Add unit tests
* Add integration tests
* Fix some incorrect tests
* 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 8c382f1e8f.
* 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>
* Made cksum to return an error if it is used on a directory regardless of the algorithm
* Added one more test for cksum on folders and deleted an old one that expected it to succeed instead of fail
* Made cksum work on more than one item if it fails and added a test for this case
for the algorithms md5, sha[1,224,256,384,512], blake2b, and sm3 from
<digest> <filesize> <filename>
to
<algo name> (<filename>) = <digest>
to use the same format as GNU cksum