Commit graph

19 commits

Author SHA1 Message Date
Marras Antoine
756293a9c4 b2sum: added tests to handle 0, non multiple of 8 and and more than 512 cases 2023-04-12 21:05:11 +02:00
Marras Antoine
0798cfe155 b2sum: added test for length option 2023-04-10 20:27:49 +02:00
0xMRTT
e7ef9dcd46
hashsum: add --zero option (#4612) (#4632)
* `hashsum`: add `--zero`  option (#4612)
2023-03-28 23:26:11 +02:00
Daniel Hofstetter
6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Joining7943
1fadeb43b2 tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.
Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
2023-01-22 14:56:19 +01:00
Terts Diepraam
bbc3495896 hashsum: enable testing --no-names
Co-authored-by: Huijeong Kim <herehuijeong@gmail.com>
2022-10-26 11:10:26 +02:00
Sylvestre Ledru
52d82d54a3 Revert "hashsum: test b3sum::test_nonames for real (#4027)"
This reverts commit 02f6fa7b24.
2022-10-25 23:44:05 +02:00
Huijeong Kim
02f6fa7b24
hashsum: test b3sum::test_nonames for real (#4027)
* hashsum: test b3sum::test_nonames for real

Signed-off-by: Huijeong Kim <herehuijeong@gmail.com>

* apply cargo format

Signed-off-by: Huijeong Kim <herehuijeong@gmail.com>
2022-10-22 11:23:39 +02:00
Sylvestre Ledru
49c435a25b
ignore a word 2022-10-20 07:46:38 +02:00
David Matos
d46e5df3d3 hashsum: warn on file not found rather than fail 2022-10-19 22:46:47 +02:00
Terts Diepraam
9177cb7b24 all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
Sylvestre Ledru
00f5d91886 sha1sum: fix the -c usage (Closes: #3815) 2022-08-14 23:32:46 +02:00
Kai Lüke
e894e40c56
hashsum: add --no-names option from official b3sum tool (#3361)
* hashsum: add --no-names option from official b3sum tool

The official b3sum tool has a --no-names option for only printing the
hashes, omitting the filenames. This is quite handy when used from
scripts because it spares the postprocessing with "cut" or "awk".
Since the installed b3sum symlink would also serve as a drop-in for the
official tool, the --no-names option is expected to exist for
compatibility.

Add a --no-names option not only for b3sum but for hashsum in general
(and maybe GNU coreutils will also feel inspired to add this option).

Closes https://github.com/uutils/coreutils/issues/3360
2022-04-06 09:09:37 +02:00
Shreyans Jain
30d7a4b167
hashsum: Add BLAKE3 to Hashing Algorithms
Signed-off-by: Shreyans Jain <shreyansthebest2007@gmail.com>
2022-02-10 12:46:44 +05:30
Jeffrey Finkelstein
cd5f676903 hashsum: add tests for Windows text mode 2021-09-17 21:24:43 -04:00
jfinkels
bdc0f4b7c3
hashsum: support --check for algorithms with variable output length (#2583)
* hashsum: support --check for var. length outputs

Add the ability for `hashsum --check` to work with algorithms with
variable output length. Previously, the program would terminate with an
error due to constructing an invalid regular expression.

* fixup! hashsum: support --check for var. length outputs
2021-08-23 18:35:19 +02:00
Gilad Naaman
81d42aa2b3 Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
Piyush Jaipuriayar
3ca8ba997c
hashsum: added blake2 as a hashing algorithm (#1651) 2020-12-08 23:32:02 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_hashsum.rs (Browse further)