Skip to content

Conversation

RenjiSann
Copy link
Collaborator

As #6603 implicitly implemented commented line support, I moved it into its own PR, with proper testing.

TL;DR:
This change make the checksum verification system ignore lines starting with #, treating them as empty lines.

Example:

$ echo 'foo-content' > foo
$ cksum --algo=sha1 foo | tee CHECKSUM
SHA1 (foo) = 058ab38dd3603703b3a7063cf95dc51a4286b6fe 

$ echo '# Comment' >> CHECKSUM 
$ cat CHECKSUM
SHA1 (foo) = 058ab38dd3603703b3a7063cf95dc51a4286b6fe
# Comment

$ cksum --check CHECKSUM
foo: OK

The changes similarly apply to hashsum and its derivatives.

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/timeout/timeout is no longer failing!

@RenjiSann
Copy link
Collaborator Author

@BenWiederhake

Copy link
Contributor

@cakebaker cakebaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great to see more tests :)

@cakebaker cakebaker merged commit 92e67a5 into uutils:main Oct 18, 2024
68 checks passed
@cakebaker
Copy link
Contributor

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants