Vardhan Patil
1fc6a760f3
tests/cksum: fix formatting
2023-12-30 20:31:52 +05:30
Vardhan Patil
e1863ac64e
tests/cksum: test when the --length argument is 0 or >512
2023-12-30 20:14:30 +05:30
Vardhan Patil
09ef150085
tests/cksum: add tests for the length argument
2023-12-30 16:01:22 +05:30
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Daniel Hofstetter
690fff2fc9
cksum: implement --untagged
2023-05-14 16:43:14 +02:00
Daniel Hofstetter
0781ad0a65
cksum: fix output of --algorithm
...
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
2023-05-11 14:24:43 +02:00
Daniel Hofstetter
ba6eb392aa
cksum: split test function into two
2023-05-10 09:48:32 +02:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
Yang Hau
678a11dcf2
cksum: Implement option -a
...
Implement option -a --algorithm.
Move digest to src/uucore/src/lib/features and rename it to hash.
fix lint
fix Cargo.toml
2023-02-18 20:58:53 +08:00
Terts Diepraam
9177cb7b24
all: add tests for usage error exit code
2022-09-10 20:59:42 +02:00
Terts Diepraam
7ae9e0a7eb
cksum: accept directories as empty files
2021-12-26 21:50:13 +01:00
Jan Verbeek
259f18fcab
Update message quoting and filename printing
2021-09-07 19:49:01 +02:00
Roy Ivy III
4e20dedf58
tests ~ refactor/polish spelling (comments, names, and exceptions)
2021-05-31 08:23:57 -05:00
Jan Scheer
3aeccfd802
fix a lot of clippy warnings
2021-05-29 15:11:22 +02:00
Yağız can Değirmenci
071899d24d
tests: delete 'error:' prefix from the tests
2021-05-26 02:45:53 +03:00
Gilad Naaman
93b03bf9a6
Ran cargo fmt
2021-04-18 02:33:52 +03:00
Gilad Naaman
0d1946a5d2
cksum: Remove direct usage of CmdResult fields in tests
2021-04-17 15:08:23 +03:00
Reto Hablützel
d51ca40986
allow ignoring stdin write errors in tests
...
* if we want to test an irregular scenario, ignoring errors caused by
writing to stdin of the command can be uselful.
* for example, when writing some text to stdin of cksum in a scenario
where it doesn't consume this input, the child process might have
exited before the text was written. therefore, this test sometimes
fails with a 'Broken pipe'.
2021-04-09 11:16:36 +02:00
Sylvestre Ledru
9ae4928b7b
Ignore a test ( #2053 )
...
* Disable chksum: test_arg_overrides_stdin
fails often with:
---- test_cksum::test_arg_overrides_stdin stdout ----
current_directory_resolved:
touch: /tmp/.tmpv9hydc/a
run: /target/x86_64-unknown-linux-gnu/debug/coreutils cksum a
thread 'test_cksum::test_arg_overrides_stdin' panicked at 'Broken pipe (os error 32)', tests/common/util.rs:742:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
* rustfmt the recent change
2021-04-09 10:14:41 +02:00
Yagiz Degirmenci
cbe07c93c6
cksum: add tests and fixtures ( #1923 )
2021-04-05 22:21:21 +02:00
Roy Ivy III
de0375f909
tests ~ reorganize tests
2020-06-01 18:30:04 -05:00