Thomas Queiroz
b924774c8a
basenc: use UResult
2021-10-02 23:17:16 -03:00
Thomas Queiroz
f85ccf8e46
tests/base64: update test
2021-10-02 23:16:07 -03:00
Thomas Queiroz
452329ad19
base64: use UResult
2021-10-02 23:15:40 -03:00
Thomas Queiroz
051284de4c
tests/base32: update test
2021-10-02 23:12:42 -03:00
Thomas Queiroz
97df700d67
base32: use UResult
2021-10-02 23:12:09 -03:00
Thomas Queiroz
9dd401c358
base32: base_common use UResult
2021-10-02 23:10:00 -03:00
vulppine
aad0682a40
seq: Adds testing for hexadecimal integer parsing
2021-10-02 08:46:09 -07:00
vulppine
d5caa0d9d8
seq: Adds hexadecimal integer parsing
2021-10-02 08:15:25 -07:00
Jeffrey Finkelstein
548a5121ae
dd: use assert! instead of if then panic!
2021-10-02 10:15:15 -04:00
Jeffrey Finkelstein
6aee05a0f1
od: use assert! instead of if then panic!
2021-10-02 09:46:43 -04:00
Jeffrey Finkelstein
de158c0122
sort: replace redundant closure with function itself
2021-10-02 09:46:43 -04:00
Jeffrey Finkelstein
06ae968ecf
csplit: use assert! instead of if then panic!
2021-10-02 09:46:43 -04:00
Jeffrey Finkelstein
71b7d6b57d
more: remove redundant mut from stdout accesses
2021-10-02 09:46:43 -04:00
Jeffrey Finkelstein
d013461a6f
ls: replace redundant closure with function itself
2021-10-02 09:46:43 -04:00
Sylvestre Ledru
b2fa51ddd9
Merge pull request #2656 from jhscheer/ls_selinux
...
`ls`: add support for showing SELinux context (--context/-Z)
2021-10-02 12:56:09 +02:00
Hanif Bin Ariffin
de605829bf
Merge branch 'master' of github.com:uutils/coreutils into hbina-tr-reimplement-expansion
2021-10-02 18:18:52 +08:00
Sylvestre Ledru
fb5650951e
Merge pull request #2696 from jhscheer/fix_check_coreutil_version
...
common/util: fix parsing of coreutil version
2021-10-02 09:03:23 +02:00
vulppine
4319248bb6
cp: Changes '1' to 'EXIT_ERR' in UError impl
2021-10-01 16:45:19 -07:00
Jan Scheer
e9371dc57d
common/util: fix parsing of coreutil version
...
For the CICD on macOS, this fixes:
```
---- common::util::tests::test_check_coreutil_version stdout ----
---- common::util::tests::test_expected_result stdout ----
thread 'common::util::tests::test_expected_result' panicked at
'byte index 4 is out of bounds of `9.0`', tests/common/util.rs:1172:41
```
2021-10-02 00:58:04 +02:00
vulppine
c64f09dc59
cp: Adds a needed macro, changes a return
2021-10-01 15:18:05 -07:00
vulppine
4ff5fea502
cp: uumain returns UResult, UError for Error
2021-10-01 14:58:26 -07:00
Sylvestre Ledru
01d098993b
Merge pull request #2662 from Smicry/master
...
add kill -l final new line #2644
2021-09-29 09:58:50 +02:00
Sylvestre Ledru
df42fed3b3
Merge pull request #2693 from thomasqueirozb/expr_uresult
...
expr: use UResult
2021-09-26 16:14:17 +02:00
Thomas Queiroz
3882df5cdc
expr: use UResult
2021-09-25 15:36:04 -03:00
Jan Scheer
30c8a43788
test_chroot: add comments
2021-09-22 13:53:57 +02:00
Jan Scheer
8cd8c25b0d
ls: silence clippy warnings if feat_selinx is not set
2021-09-22 13:49:08 +02:00
Jan Scheer
8f229aad87
ls: move SELinux String building logic to its own function
2021-09-22 12:24:27 +02:00
Jan Scheer
8c0b7d1314
chroot: move logic so it can be triggered by tests
...
* move the command building logic before the `chroot` syscall so it
will be reachable by tests that don't have root permissions.
2021-09-22 11:59:43 +02:00
Sylvestre Ledru
a0f538f2e8
Merge pull request #2679 from blyxxyz/uucore-inspection
...
uucore: Minor cleanup
2021-09-19 22:28:16 +02:00
Sylvestre Ledru
629e446da4
Merge pull request #2691 from raftario/yanked-digest
...
Use non-yanked version of digest crate in hashsum
2021-09-19 22:27:41 +02:00
Jan Scheer
8db8d8ac4e
chroot: add 'test_default_shell`
2021-09-19 22:21:29 +02:00
Raphaël Thériault
6931dd11f1
Use non-yanked version of digest crate in hashsum
2021-09-19 12:38:56 -07:00
Hanif Bin Ariffin
1dc438c9d9
Fix spell check ignore list
...
Use this small script:
```shell
<list> | tr ' ' '\n' | sort | uniq | tr '\n' ' '
```
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-09-19 23:26:49 +08:00
Hanif Bin Ariffin
e0d1bf9bba
Ignore some spell checks
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-09-19 23:15:42 +08:00
Hanif Bin Ariffin
f464879b12
Reduce MSRV to 1.47.0
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-09-19 23:15:28 +08:00
Hanif Bin Ariffin
9ab4f3de2f
Merge branch 'master' of github.com:uutils/coreutils into hbina-tr-reimplement-expansion
2021-09-19 23:01:48 +08:00
Jan Scheer
94fbe1edef
chroot
: quick fix for #2687
...
* fixes #2687
* change error message to better mimic GNU
2021-09-19 13:58:44 +02:00
Sylvestre Ledru
8d418cd61c
Merge pull request #2672 from oeble/kill_with_signal_name
...
Kill with signal name
2021-09-18 22:55:27 +02:00
Sylvestre Ledru
3e8b4045c8
Merge pull request #2675 from blyxxyz/whoami-cleanup
...
whoami: Cleanup
2021-09-18 17:20:09 +02:00
Sylvestre Ledru
b59bbddcbf
Merge pull request #2663 from jfinkels/hashsum-std-io-copy
...
hashsum: use std::io::copy() to simplify digest
2021-09-18 17:19:16 +02:00
Sylvestre Ledru
81c2dc74e8
Merge pull request #2676 from jfinkels/seq-format-padding
...
seq: replace loops with a single format string
2021-09-18 17:18:35 +02:00
Jan Verbeek
7ea2bfbe26
seq: replace loops with a single format string
...
Replace two loops that print leading and trailing 0s when printing a
number in fixed-width mode with a single call to `write!()` with the
appropriate formatting parameters.
2021-09-18 10:27:03 -04:00
Jeffrey Finkelstein
bfb1327ad4
seq: use print_seq_integers() regardless of last
...
Ensure that the `print_seq_integers()` function is called when the first
number and the increment are integers, regardless of the type of the
last value specified.
2021-09-18 10:27:03 -04:00
Sylvestre Ledru
522d4d39e3
Merge pull request #2680 from blyxxyz/utmpx-safety
...
uucore::utmpx: Make thread-safe
2021-09-18 16:15:52 +02:00
Jeffrey Finkelstein
7fea771f32
hashsum: use std::io::copy() to simplify digest
...
Create a `DigestWriter` struct that implements `Write` by passing bytes
directly to `Digest::input()`, so that `hashsum` can use
`std::io::copy()`. Using `std::io::copy()` eliminates some boilerplate
code around reading and writing bytes. And defining `DigestWriter` makes
it easier to add a `#[cfg(windows)]` guard around the Windows-specific
replacement of "\r\n" with "\n".
2021-09-18 09:51:33 -04:00
Sylvestre Ledru
7fb1fcfac5
Merge pull request #2686 from jfinkels/hashsum-window-text-mode
...
hashsum: add tests for Windows text mode
2021-09-18 09:16:48 +02:00
Sylvestre Ledru
77cfafa511
Merge pull request #2613 from jfinkels/seq-width-fractional
...
seq: correctly compute width due to decimal places
2021-09-18 09:16:35 +02:00
Jeffrey Finkelstein
3854a97749
seq: remove unused Number::num_digits() function
...
Remove the `Number::num_digits()` function in favor of the
`digits::num_integral_digits()` functions.
2021-09-17 23:50:13 -04:00
Jeffrey Finkelstein
2ac5dc0a70
seq: compute correct width for scientific notation
...
Change the way `seq` computes the number of digits needed to print a
number so that it works for inputs given in scientific notation.
Specifically, this commit parses the input string to determine whether
it is an integer, a float in decimal notation, or a float in scientific
notation, and then computes the number of integral digits and the number
of fractional digits based on that. This also supports floating point
negative zero, expressed in both decimal and scientific notation.
2021-09-17 23:49:54 -04:00
Jeffrey Finkelstein
cd5f676903
hashsum: add tests for Windows text mode
2021-09-17 21:24:43 -04:00