kimono-koans
fd64e01d92
ls: Reduce binary size of ls by removing regex crate ( #2781 )
2021-12-22 18:31:45 +01:00
Sylvestre Ledru
59da0d8cd6
cp: add a unit test for issue 1665
2021-12-19 18:19:48 +01:00
electricboogie
a1960f5da0
Fix cp bug: pre-write permission change ( #2769 )
2021-12-15 22:18:02 +01:00
Sylvestre Ledru
52d2fe1d28
Try to unbreak the code coverage CI.
...
For some reasons, on windows, test_compress_fail is failing with a different
error. So, don't check the output on windows
2021-12-14 09:46:28 +01:00
electricboogie
c7f7a222b9
Fix mv bug: Should be able to stat files, but not able to mv if source and target are the same ( #2763 )
...
Closes #2760
2021-12-12 17:49:38 +01:00
Jan Verbeek
f2ddae93fa
uucore::entries: Make Passwd::locate and Group::locate thread-safe
2021-11-26 14:48:33 +01:00
Roy Ivy III
f07a1749a1
fix spell-check errors
2021-11-19 17:55:02 -06:00
Roy Ivy III
7133efd0a5
tests ~ fix cargo clippy
complaint (clippy::needless_return)
2021-11-19 17:55:02 -06:00
Sylvestre Ledru
43bdcaf212
Merge pull request #2532 from hbina/hbina-rm-silently-accept-presume-input-tty
...
Silently accepts ---presume-input-tty
2021-11-19 21:42:41 +01:00
Sylvestre Ledru
01440734a4
Merge pull request #2735 from thomasqueirozb/printenv_env_compat
...
env+printenv: use UResult + improve compatibility
2021-11-19 21:39:34 +01:00
Sylvestre Ledru
da69ab19db
Merge pull request #2745 from thomasqueirozb/chmod_uresult
...
chmod: use UResult
2021-11-19 21:38:31 +01:00
Smicry
fc851e036b
Implement tail -<number> ( #2747 )
...
And add obsolete_syntax test
2021-11-19 21:37:47 +01:00
Thomas Queiroz
fed596a23b
tests/chmod: change normal error to usage error
2021-11-12 19:07:37 -03:00
Sylvestre Ledru
177374aa5a
Merge pull request #2740 from jfinkels/seq-inf-width-spaces
...
seq: correct fixed-width spacing for inf sequences
2021-11-12 21:16:40 +01:00
Thomas Queiroz
c9624725ab
tests: use CmdResult::usage_error
2021-11-09 17:37:05 -03:00
Thomas Queiroz
f43dfa9a61
tests/common: implement CmdResult::usage_error
2021-11-09 16:36:03 -03:00
Thomas Queiroz
0bbc805e43
tests/common: add util_name+bin_path to CmdResult
2021-11-09 16:36:03 -03:00
Thomas Queiroz
ab4573bde9
tests/common: create TestScenario::composite_cmd
...
This is made to call UCommand::new with Some(util_name)
2021-11-09 16:35:38 -03:00
Thomas Queiroz
d4ca4371d7
tests/common: add util_name+bin_path to UCommand
2021-11-09 04:04:56 -03:00
Thomas Queiroz
fc300dda24
tests/common: UCommand::new rename arg to bin_path
...
Merge and remove unecessary `.as_ref()`
2021-11-09 00:12:11 -03:00
Jeffrey Finkelstein
0b86afa858
seq: correct fixed-width spacing for inf sequences
...
Pad infinity and negative infinity values with spaces when using the
`-w` option to `seq`. This corrects the behavior of `seq` to match that
of the GNU version:
$ seq -w 1.000 inf inf | head -n 4
1.000
inf
inf
inf
Previously, it incorrectly padded with 0s instead of spaces.
2021-11-08 20:12:54 -05:00
Thomas Queiroz
124f929848
tests/env: change Windows test_change_directory
...
Invoke `cmd.exe /C cd` to determine the current working directory instead of relying on the output of
environment variables.
2021-11-07 23:11:39 -03:00
jfinkels
2e12316ae1
seq: use BigDecimal to represent floats ( #2698 )
...
* seq: use BigDecimal to represent floats
Use `BigDecimal` to represent arbitrary precision floats in order to
prevent numerical precision issues when iterating over a sequence of
numbers. This commit makes several changes at once to accomplish this
goal.
First, it creates a new struct, `PreciseNumber`, that is responsible for
storing not only the number itself but also the number of digits (both
integer and decimal) needed to display it. This information is collected
at the time of parsing the number, which lives in the new
`numberparse.rs` module.
Second, it uses the `BigDecimal` struct to store arbitrary precision
floating point numbers instead of the previous `f64` primitive
type. This protects against issues of numerical precision when
repeatedly accumulating a very small increment.
Third, since neither the `BigDecimal` nor `BigInt` types have a
representation of infinity, minus infinity, minus zero, or NaN, we add
the `ExtendedBigDecimal` and `ExtendedBigInt` enumerations which extend
the basic types with these concepts.
* fixup! seq: use BigDecimal to represent floats
* fixup! seq: use BigDecimal to represent floats
* fixup! seq: use BigDecimal to represent floats
* fixup! seq: use BigDecimal to represent floats
* fixup! seq: use BigDecimal to represent floats
2021-11-06 15:44:42 +01:00
Hanif Bin Ariffin
7baa05b2db
Add tests for silently accepting presume-input-tty
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-11-04 17:04:26 +08:00
Thomas Queiroz
c44b5952b8
tests/env: add unsetting invalid variables test
2021-11-02 19:51:37 -03:00
Michael Debertol
a05628f018
Merge pull request #2731 from thomasqueirozb/env_empty_name
...
env: don't panic when name is empty
2021-11-02 21:33:42 +01:00
Thomas Queiroz
f9512e5a90
tests/env: add empty name test
2021-11-02 16:45:39 -03:00
Michael Debertol
7c94bb082e
Merge pull request #2726 from thomasqueirozb/strip_pre_suffix
...
uu+tests: use strip_prefix and strip_suffix
2021-11-01 23:34:27 +01:00
Kevin Burke
3e1c5c2d99
rm: allow -r flag to be specified multiple times
...
GNU rm allows the `-r` flag to be specified multiple times, but
uutils/coreutils would previously exit with an error.
I encountered this while attempting to run `make clean` on the
Postgres source tree (github.com/postgres/postgres).
Updates #1663 .
2021-10-28 22:47:07 -07:00
Sylvestre Ledru
1b39a10938
Merge pull request #2694 from jhscheer/clippy_warnings
...
tests: silence clippy warnings for unused_imports
2021-10-24 19:09:09 +02:00
Thomas Queiroz
007f1b9f84
uu+tests: use strip_prefix and strip_suffix
2021-10-24 12:23:32 -03:00
Thomas Queiroz
1d8381064a
tests/uniq: update test
2021-10-24 02:59:50 -03:00
Sylvestre Ledru
610fde45ef
Merge pull request #2709 from jaggededgedjustice/support-symboli-modes
...
Add symbolic mode support to mkdir
2021-10-23 17:54:15 +02:00
Sylvestre Ledru
c43436d50a
Merge pull request #2710 from jfinkels/tests-add-missing-assert-placeholder
...
tests: add template string to assert! statements
2021-10-19 20:53:35 +02:00
Jan Scheer
bfa8a2a068
tests/util: add more wrappers for common file handling tasks
...
truncate, rename, remove, copy, rmdir, etc.
2021-10-19 01:12:12 +02:00
Jan Scheer
4cf26f0fc2
Merge branch 'master' into clippy_warnings
2021-10-19 00:48:38 +02:00
James Robson
0b2483452a
Add symbolic mode support to mkdir
2021-10-16 12:57:55 +01: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
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
00de952592
Fix various 'if_then_panic' clippy warnings
2021-10-10 09:57:39 +02: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
03a037e8ea
Merge pull request #2701 from vulppine/seq-hex
...
seq: Adds hexadecimal integer parsing
2021-10-09 11:01:42 +02:00
vulppine
cddd40b4e1
seq: Updates hex parse readability, adds hex test
2021-10-05 18:41:28 -07:00
vulppine
4e1f945e86
seq: Adds testing for large hex numbers
2021-10-03 09:50:49 -07:00
Thomas Queiroz
f85ccf8e46
tests/base64: update test
2021-10-02 23:16:07 -03:00
Thomas Queiroz
051284de4c
tests/base32: update test
2021-10-02 23:12:42 -03:00
vulppine
aad0682a40
seq: Adds testing for hexadecimal integer parsing
2021-10-02 08:46:09 -07: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