Jeffrey Finkelstein
c50b5ac110
hashsum: fix handling of \r\n in Windows text mode
...
Fix a bug in which "\r\n" was not being replaced with "\n" in text mode
on Windows. This would happen only if one call to `write()` ended with a
"\r" character and the next call to `write()` started with a "\n"
character. This commit fixes the bug by buffering a "\r" character if it
appears at the end of one call to `write()` and only writing if the
first character in the next call to `write()` is *not* a "\n" character.
Fixes issue #2681 .
2021-10-11 17:36:08 -04:00
Jeffrey Finkelstein
9e21d26b7c
tests: add template string to assert! statements
...
Add missing "{}" template strings to `assert!()` statements.
2021-10-11 16:51:14 -04:00
Adam Reichold
86d22aaa1d
tac: Add a simple how to for benchmarking
2021-10-10 14:29:37 +02:00
Adam Reichold
c526df57b8
tac: opportunistically use memory maps
...
Since tac must read its input files completely to start processing them
from the end, it is particularly suited to use memory maps to benefit
from the page cache maintained by the operating systems to bring the
necessary data into memory as required.
This does also include situations where the input is stdin, but not via
a pipe but for example a file descriptor set up by the user's shell
through an input redirection.
2021-10-10 13:20:31 +02:00
Adam Reichold
4eab275235
tac: buffer stdout more coarsely than line-based following the GNU tac implementation.
2021-10-10 13:20:31 +02:00
Adam Reichold
28b04fa899
tac: do not use a buffered read as fs::read is more efficient and io::Stdin is buffered internally
2021-10-10 13:20:31 +02:00
Adam Reichold
0d583754ca
tac: lock stdout only once instead for each line
2021-10-10 13:20:31 +02:00
Adam Reichold
e041fda51d
tac: do not re-compile regular expression for each file
2021-10-10 13:20:31 +02:00
Sylvestre Ledru
11ca4be1aa
Merge pull request #2707 from sylvestre/more-clippy
...
More clippy fixes
2021-10-10 12:46:35 +02:00
Sylvestre Ledru
51613c02ec
add a word to ignore...
2021-10-10 12:16:01 +02:00
Sylvestre Ledru
788618e9de
Merge pull request #2708 from adamreichold/fix-pr-stdout-lock
...
pr: fix locking of stdout
2021-10-10 12:15:23 +02:00
Adam Reichold
b4864d760e
pr: fix locking of stdout
2021-10-10 11:33:46 +02:00
Sylvestre Ledru
54ae2fa64a
Merge pull request #2689 from jhscheer/fix_chroot_2687
...
`chroot`: quick fix for #2687
2021-10-10 10:15:22 +02:00
Sylvestre Ledru
00de952592
Fix various 'if_then_panic' clippy warnings
2021-10-10 09:57:39 +02:00
Sylvestre Ledru
32ec3f75ee
Merge pull request #2706 from chadbrewbaker/master
...
Fix need for ssh keys
2021-10-10 09:41:34 +02:00
Chad Brewbaker
a9bfd5df06
Fix need for ssh keys
...
Github now mandates git ssh keys instead of username/password. I modified the download instructions to remove the need for ssh authentication.
2021-10-09 23:01:05 -05:00
Jan Scheer
3e985cb029
Merge branch 'master' into fix_chroot_2687
2021-10-10 01:04:25 +02:00
Jan Scheer
3300d80e3f
tests: silence clippy warnings for unused_imports
2021-10-10 00:52:18 +02:00
Sylvestre Ledru
080d3d2fa7
Merge pull request #2697 from vulppine/cp-uresult
...
cp: uumain returns UResult, implements UError for Error enum in cp.rs
2021-10-09 11:03:33 +02:00
Sylvestre Ledru
03a037e8ea
Merge pull request #2701 from vulppine/seq-hex
...
seq: Adds hexadecimal integer parsing
2021-10-09 11:01:42 +02:00
Sylvestre Ledru
ba53844b19
Merge pull request #2704 from thomasqueirozb/users_uresult
...
Users: use UResult | #[macro_use] refactor
2021-10-06 21:29:21 +02:00
vulppine
cddd40b4e1
seq: Updates hex parse readability, adds hex test
2021-10-05 18:41:28 -07:00
Thomas Queiroz
e2fa6f9412
users: use UResult
2021-10-04 19:53:46 -03:00
Thomas Queiroz
00c9710206
uucore_procs+uu: specify uucore::show_error
...
This allows crates to use `#[uucore_procs::gen_uumain]` without `use uucore::show_error` or
#[macro_use]
extern crate uucore;
Removed unecessary usage
2021-10-04 19:53:16 -03:00
vulppine
4e1f945e86
seq: Adds testing for large hex numbers
2021-10-03 09:50:49 -07:00
Sylvestre Ledru
368fa54520
Merge pull request #2703 from thomasqueirozb/base_uresult
...
base32 + base64 + basenc: use UResult
2021-10-03 17:34:56 +02:00
Sylvestre Ledru
20becf8166
Merge pull request #2699 from jfinkels/lint-fixes
...
ls,more,csplit,sort,od,dd: fix clippy complaints
2021-10-03 10:35:13 +02:00
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
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