cksum: Adding the functionality for --zero.#6180
cksum: Adding the functionality for --zero.#6180orangeng wants to merge 3 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
src/uu/cksum/src/cksum.rs
Outdated
| } | ||
| } | ||
| } | ||
| match options.zero { |
There was a problem hiding this comment.
please use a if
no need for match here
|
could you please add a test? |
src/uu/cksum/src/cksum.rs
Outdated
| if options.zero { | ||
| print!("\0"); | ||
| } else { | ||
| print!("\n"); |
There was a problem hiding this comment.
| print!("\n"); | |
| println!(); |
|
GNU testsuite comparison: |
|
Could you check out some of the other utils. I believe we added some functionality for this in uucore. I think it was called Edit: Here it is: https://docs.rs/uucore/latest/uucore/line_ending/enum.LineEnding.html. It's used in basename for example: https://github.com/uutils/coreutils/blob/main/src/uu/basename/src/basename.rs#L35 https://github.com/uutils/coreutils/blob/main/src/uu/basename/src/basename.rs#L70-L72 |
|
Changed to use |
|
is it ready to be reviewed? Thanks |
|
Unfortunately, school got busy and had to put this aside temporarily. Will be back on this in 1 week. |
|
Ping :) @orangeng Do you have time to finish this ? |
|
@RenjiSann thanks for reminding me haha, I unfortunately don't have time so I will close this PR. Feel free to have a go at it |
Adding the functionality for --zero / -z. As mentioned in issue #6178