* Add a new error type InvalidPrecision
* check if the precision is valid before writing to stdout when it is signedInt, unsigned, or float
* add tests for invalid precision check
* add tests for invalid precision check
* fix possible cross-platform issue that code failing to pass on some tests
* uucore/format: inline var in format string
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
tr detects if a class in set2 is matched by a class at the correct position in set1 after it has expanded everything before the class in both sets:
So
tr 'abcd[:upper:]' 'a-d[:lower:]'
should not fail
OpenBSD uses the original utmp file format so the general `users` does not
work there. By using the `utmp-classic` lib, we cna process the current users
on the system from the /var/run/utmp and show the list.
fixes#5665
If there is a [:lower:] or [:upper:] in set2, then there must be a [:lower:] or [:upper:] at the
same logical position in set1
So
tr -t [:upper:] [:lower:] works
tr -t 1[:upper:] [:lower:] doesnt
We have 3 different kinds of input:
* "algo (filename) = checksum"
example: `BLAKE2 (a) = bedfbb90d858c2d67b7ee8f7523be3d3b54004ef9e4f02f2ad79a1d05bfdfe49b81e3c92ebf99b504102b6bf003fa342587f5b3124c205f55204e8c4b4ce7d7c`
* "checksum filename"
example: `60b725f10c9c85c70d97880dfe8191b3 a`
* "checksum filename"
example: `60b725f10c9c85c70d97880dfe8191b3 a`
These algo/regexp are tricky as files can be called "a, " b", " ", or "*c".
We look at the first time to analyze the kind of input and reuse the same regexp then.
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
* env: adds --ignore-signal
This commit implement #6164.
* env: handle STOP signal and fix styling issue
* env: fix encoded bytes
* env: adds SAFETY comment and handle special signals in ignore_signal
* env: fix parsing to have compatible behaviour
* env: remove derive from Options
* env: changed safety comment, handle duplications after parsing and non-unix cfg
* env: adds tests for ignore-signal parsing and invalid and special signals
* env: change signal values to be non-constant
* env: adds testing for signal ignoring
* env: styling and remove unix specific derive
* test_env: add SIGSTOP to cspell workspace wordlist
* env: makes signal handling unix specific
* env: make ignore-signal function invocation unix specific
* test_env: make signal vector use slices ref instead of vec (linter)
* env: makes ignore-signal in options unix specific
* test_env: add unix specific import