Terts Diepraam
c3f9e19a3b
all: normalize license notice in all *.rs files
2023-08-24 12:21:09 +02:00
Daniel Hofstetter
1b705ae07c
factor: simplify loop in test
2023-08-22 09:45:17 +02:00
Sylvestre Ledru
0b9c829bce
Merge pull request #5182 from sylvestre/clippy_
...
Fix some of the recent clippy warnings
2023-08-21 16:21:02 -04:00
Sylvestre Ledru
bf5b765cba
Remove the author copyright notices ( #5184 )
...
* Remove the author copyright notices
Rational:
* not maintained
* does not reflect reality
* don't provide any value (the info can be found in the git log)
* we don't have rules to update them
(ex: should you update it after one line, two lines, etc)
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-08-21 12:23:18 +02:00
Sylvestre Ledru
d8f28364f0
Merge pull request #5168 from cakebaker/chown_remove_duplication_in_tests
...
chown: remove some duplication in tests
2023-08-21 12:22:32 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Sylvestre Ledru
7c9f4ba92a
Fix some clippy warnings
2023-08-21 08:41:40 +02:00
tommady
b5746f794c
date: fix panic when input will cause overflow ( #5160 )
...
* fix issue 5149
* fix clippy style issue
* fix spell issue
* address comment
* address comments
* fix cspell
2023-08-20 16:55:38 +02:00
Daniel Hofstetter
d604f709ce
nl: handle line number overflow
2023-08-19 07:16:06 +02:00
Terts Diepraam
f1978955ba
Merge pull request #5156 from cakebaker/nl_implement_try_from_for_numbering_style
...
nl: implement TryFrom<&str> for NumberingStyle
2023-08-18 23:10:32 +02:00
Daniel Hofstetter
8b9509a55b
chown: remove some duplication in tests
2023-08-18 16:11:11 +02:00
Bluelief
a7ab660a38
fmt: change test to ignore and fix test output
...
- fix test to get same result as GNU fmt
2023-08-15 00:43:32 +09:00
Bluelief
946e1bb2d1
fmt: fix panic on width argument
2023-08-14 22:47:21 +09:00
Daniel Hofstetter
d5ab7bbacd
nl: implement TryFrom<&str> for NumberingStyle
2023-08-13 14:09:15 +02:00
Daniel Hofstetter
08e21e183b
nl: re-add handling for -p/--no-renumber
2023-08-12 14:36:22 +02:00
John Shin
631b9892f6
split: loop over chars and remove char_from_digit function
2023-08-11 18:36:08 -07:00
Terts Diepraam
31eebea804
Merge pull request #5131 from cakebaker/nl_refactoring
...
nl: fix output of numbering styles
2023-08-10 23:52:30 +02:00
Rayhan Faizel
4143859266
tests/stat: Test case for using - and -f together
2023-08-10 08:41:19 +05:30
Daniel Hofstetter
cef9ab10c3
sleep: adapt two tests to fundu 2.0.0
2023-08-08 09:10:33 +02:00
John Shin
2bb56d44a4
seq: add tests for infinity and -infinity args
2023-08-05 19:40:45 -07:00
Daniel Hofstetter
271606ddfa
nl: fix output of numbering styles
2023-08-03 16:53:56 +02:00
Terts Diepraam
c2997718cd
touch: move from time to chrono
...
This allows us to work with daylight savings time which is necessary to enable one of the tests. The leap second calculation and parsing are also ported over. A bump in the chrono version is necessary to use NaiveTime::MIN.
2023-07-27 17:06:38 +02:00
Sylvestre Ledru
9449eda51d
Merge pull request #5103 from cakebaker/nl_join_blank_lines_show_error_if_zero
...
nl: show error if --join-blank-lines is zero
2023-07-25 20:18:43 +02:00
Sylvestre Ledru
e77a1bf54c
Merge pull request #4342 from tmccombs/mktemp-req-equals
...
Require = for --tmpdir in mktemp
2023-07-21 14:36:25 +02:00
Daniel Hofstetter
aef130dae7
nl: show error if --join-blank-lines is zero
2023-07-20 15:26:46 +02:00
Daniel Hofstetter
d7d2ad52db
nl: fix zero padding of negative line numbers
2023-07-19 16:22:53 +02:00
Terts Diepraam
964b1d6e10
mktemp: fix both_tmpdir_flags_present test on windows
2023-07-18 12:46:05 +02:00
Thayne McCombs
536db164bf
Fix mktemp test for windows
2023-07-18 12:46:05 +02:00
Thayne McCombs
6262a3e9d9
Add tests for mktemp tmpdir flags
...
And set overrides_with for tmpdir flags.
Tests were copied from #4275
Co-authored-by: David Matos <davidmatos06@gmail.com>
2023-07-18 12:46:05 +02:00
Daniel Hofstetter
27ee279913
nl: fix calculation of line number lengths
2023-07-18 09:30:23 +02:00
Sylvestre Ledru
c851d3c5dc
Merge pull request #5086 from shinhs0506/factor-vec
...
uucore: provide capacity for vectors
2023-07-15 10:05:26 +02:00
John Shin
596fe4f66f
uucore: provide capacity for vectors
2023-07-14 22:45:49 -07:00
Daniel Hofstetter
388f249716
nl: allow negative values for -i and -v
2023-07-14 12:31:17 +02:00
Daniel Hofstetter
5d03d2d9d4
clippy: fix warnings introduced by Rust 1.71.0
2023-07-13 17:35:33 +02:00
Sylvestre Ledru
1897c18e88
Merge pull request #5073 from cakebaker/nl_add_test_for_number_separator
...
nl: add test for "--number-separator"
2023-07-12 22:42:01 +02:00
Rayhan Faizel
9e26534239
tests/ls: Test overflowing decimal and octal values of --width
2023-07-12 23:24:26 +05:30
Daniel Hofstetter
20b1f11daa
nl: add test for "--number-separator"
...
and replace "match" with "if let"
2023-07-12 15:25:02 +02:00
Daniel Hofstetter
826adc62aa
nl: show error if --number-width is zero
...
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-07-11 17:45:53 +02:00
Daniel Hofstetter
cb50208909
nl: use value parser for "--number-format"
2023-07-10 11:20:37 +02:00
John Shin
4db5a60667
ls: add back version cmp test
2023-07-09 15:30:56 -07:00
Daniel Hofstetter
f8a955266e
Merge pull request #4750 from NikolaiSch/seq-panic-fix
...
fix: seq panic on no arguments #4749
2023-07-09 14:19:07 +02:00
Daniel Hofstetter
0b37b63ea3
Merge pull request #5055 from yt2b/ls_literal_option
...
ls: --l should output the same as --literal
2023-07-09 14:07:24 +02:00
Sylvestre Ledru
78fd0efab9
Merge pull request #5013 from shinhs0506/core-version-cmp
...
uucore: leading zeros are ignored in version compare
2023-07-09 09:21:18 +02:00
Daniel Hofstetter
6f91371e61
touch: accept "modify" & "mtime" for --time arg
2023-07-08 16:13:35 +02:00
yt2b
cf6f7856e4
ls: fix --l option
2023-07-08 10:43:20 +09:00
Daniel Hofstetter
98264e9cdf
seq: add test for call without args
2023-07-05 15:51:23 +02:00
John Shin
844cbdc5a4
sort: add tests for stable and unstable sort
2023-07-05 10:05:52 +02:00
John Shin
b42a5b8741
ls: update test result for version compare
2023-07-05 10:05:52 +02:00
Daniel Hofstetter
4a192e98d5
Merge pull request #5032 from sylvestre/split-fail
...
split: reject some invalid values
2023-07-05 07:04:22 +02:00
Daniel Hofstetter
fee5225cb6
nl: make --no-renumber a flag
2023-07-04 10:37:10 +02:00
Sylvestre Ledru
d033db3573
split: reject some invalid values
...
Matches what is done in tests/split/fail.sh
(still doesn't work)
2023-07-03 22:57:37 +02:00
Sylvestre Ledru
6e3ab23183
Merge pull request #5017 from cakebaker/df_disable_some_tests_on_windows
...
df: disable failing tests on Windows
2023-07-03 16:27:00 +02:00
Daniel Hofstetter
11b098fce1
Merge pull request #5028 from sylvestre/cp-multiple
...
cp: allow multiple usages of -R - Closes : #5027
2023-07-03 16:09:45 +02:00
Sylvestre Ledru
e491bbdbed
cp: allow multiple usages of -R/-r Closes : #5027
...
works for all other rm args
2023-07-03 14:19:45 +02:00
Sylvestre Ledru
7a7842b5b8
Merge pull request #4756 from Joining7943/tail-refactor-and-fix-input
...
`tail`: Refactor `paths::Input::from` and `Settings::inputs`
2023-07-03 14:09:57 +02:00
Daniel Hofstetter
ba509a1489
cp: use mkdir_all() instead of mkdir() in test
2023-07-03 09:24:37 +02:00
sbentmar
42bf580f13
numfmt: add --invalid option ( #4249 )
...
* numfmt: add invalid option
* numfmt: return code 0 if ignore or warn
* numfmt: implement all --invalid modes
* numfmt: validate stdout and stderr
* numfmt: remove unnecessary code
* numfmt: apply formatting
* numfmt: fix clippy issues
* numfmt: fix failing test cases
* numfmt: fix formatting
* numfmt: fix bug when handling broken pipe
* numfmt: fix bug where extra newline was added
* numfmt: add test cases for edge cases
* numfmt: simplify error handling
* numfmt: remove redundant if
* numfmt: add newline between functions
* numfmt: fix failing test cases
* numfmt: add support for arg numbers using --invalid
* numfmt: simplify error handling in value handlers
* numfmt: fix merge conflict and align prints
* numfmt: fix clippy suggestion
* numfmt: replace "valid" with "invalid" in tests
* numfmt: move INVALID to respect alph. order
* numfmt: move printlns outside of match to avoid duplication
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
* numfmt: remove empty line
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-07-01 17:08:12 +02:00
Daniel Hofstetter
a145798594
Merge pull request #4960 from granquet/ls_LZ
...
ls: force fetching metadata when called with -L -Z
2023-07-01 15:24:37 +02:00
Daniel Hofstetter
c524ec4a9f
Merge pull request #4950 from Ideflop/more_implement_arguments_plain_and_from_line
...
More implement arguments plain and from line
2023-07-01 14:18:54 +02:00
Daniel Hofstetter
5b18c53c9d
Merge pull request #4999 from sylvestre/mv-backup-src
...
mv: add the check with --b=simple and when the source is a backup
2023-06-29 13:19:40 +02:00
Sylvestre Ledru
682e0e3750
Merge pull request #5012 from cakebaker/seq_rename_widths_to_equal_width
...
seq: rename "--widths" to "--equal-width"
2023-06-28 23:24:47 +02:00
Sylvestre Ledru
40c598852b
mv: add the check with --b=simple and when the source is a backup
2023-06-28 23:11:28 +02:00
Daniel Hofstetter
2d76a3b88e
df: disable failing tests on Windows
2023-06-28 14:43:35 +02:00
Daniel Hofstetter
732dbb3f12
cp: fix "unused variable" warning on Windows
2023-06-27 16:46:50 +02:00
Daniel Hofstetter
c99d81a05b
du: fix "unused import" warning on Windows
2023-06-27 15:05:27 +02:00
Daniel Hofstetter
01f70768d9
cp: fix "unused variable" warnings on Windows
2023-06-27 14:57:06 +02:00
Ideflop
c4c3a354f8
tests/more: test argument --from-line
2023-06-26 21:57:52 +02:00
Ideflop
479340306e
more: implement arguments -u/--plain and -F/--from-line
2023-06-26 21:57:45 +02:00
Daniel Hofstetter
c05dbfa3b4
seq: rename "--widths" to "--equal-width"
...
for compatibility with GNU seq
2023-06-26 16:21:59 +02:00
Terts Diepraam
873c6c36f7
Merge branch 'main' into ls_LZ
2023-06-26 15:52:52 +02:00
Daniel Hofstetter
9149409065
Merge pull request #4991 from shinhs0506/du_apparent
...
du: directories have apparent size of 0
2023-06-26 14:58:40 +02:00
Guillaume Ranquet
80c7ed9732
ls: force fetching metadata when called with -L -Z
...
The metadata are not used but it permits to check the symlink is valid.
We then return 1 on invalid symlinks when ls is invoked with ls -L -Z
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-26 14:46:56 +02:00
John Shin
b34e7f7bf6
du: directories have apparent size of 0
2023-06-25 15:56:57 -07:00
Sylvestre Ledru
ddcdda44db
Remove the auto capitalization of error message
2023-06-25 00:18:33 +02:00
Daniel Hofstetter
a18bf4b073
Merge pull request #4987 from sylvestre/help-version-getopt
...
Make tests/help/help-version-getopt.sh pass
2023-06-21 09:30:53 +02:00
Sylvestre Ledru
8debc96eeb
Merge pull request #4983 from TheDcoder/parse-hex
...
od: fix parsing of hex input ending with `E`
2023-06-20 22:55:32 +02:00
Sylvestre Ledru
bf7f3783d1
yes: allow --version
...
Test: tests/help/help-version-getopt.sh
2023-06-19 19:10:56 +02:00
Damon Harris
b7154a80e1
od: fix parsing of hex input ending with E
2023-06-18 21:02:39 +05:30
Kostiantyn Hryshchuk
7306be6e58
fixed shred -u for windows
...
fixed shred panic on windows
2023-06-18 17:12:10 +02:00
John Shin
47d0ac4a42
sync: fix error msg
2023-06-17 19:50:47 -07:00
Rayhan Faizel
269ffc12b4
tests/mv: add tests to check for copying symlinks onto hardlinks to symlink
2023-06-12 23:49:28 +05:30
Rayhan Faizel
6bc15aac99
tests/mv: Test for particular edge cases when handling symlink files
2023-06-10 18:32:41 +05:30
Daniel Hofstetter
3caa2c0d8f
mkdir: rename var "scene2" -> "scene" in test
2023-06-07 10:44:11 +02:00
Daniel Hofstetter
750eacc10c
mkdir: remove TEST_DIR<X> consts in tests
2023-06-07 10:42:01 +02:00
Daniel Hofstetter
0128198a99
Merge pull request #4954 from Skryptonyte/ls_sortwidth
...
ls: Implement new sort option --sort=width
2023-06-06 18:46:54 +02:00
Daniel Hofstetter
c26396087f
ls: add words to spell-checker:ignore
2023-06-06 17:44:04 +02:00
Rayhan Faizel
21f1a119c3
tests/ls: Implement tests for sort by width option
2023-06-06 20:56:42 +05:30
Detlev Casanova
43a8d62b90
tsort: Add test for ordered floating nodes
...
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
2023-06-05 11:06:53 -04:00
Sylvestre Ledru
1895d1bc3a
Merge pull request #4943 from cakebaker/remove_users_crate
...
Remove users crate
2023-06-04 18:45:04 +02:00
Tracy
126bbba17a
pwd: Fixes #4855 ( #4937 )
...
Based on testing with GNU's pwd, it seems like the -P flag should
take precedence over the use of the POSIXLY_CORRECT flag.
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-06-04 16:03:01 +02:00
Daniel Hofstetter
29f011e28c
Remove users crate
2023-06-04 14:55:16 +02:00
Guillaume Ranquet
ee4691f4a2
cp: makes --preserve requires =
...
prevents --preserve to eat the next argument when no value is passed.
default value for --preserve is set to mode,ownership(unix only),timestamps
before the patch:
cp --preserve foo bar
error: invalid value 'foo' for '--preserve [<ATTR_LIST>...]'
[possible values: mode, ownership, timestamps, context, link, links, xattr, all]
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-04 09:46:35 +02:00
Sylvestre Ledru
160952a42c
Merge pull request #4918 from shinhs0506/core-size
...
shred: add support for octal and hex size
2023-06-03 10:48:19 +02:00
Sylvestre Ledru
e8effd0d0a
Merge pull request #4914 from Ideflop/more_implement_arguments_lines_and_number
...
more: implement arguments -n/--lines and --number
2023-06-02 20:20:20 +02:00
Daniel Hofstetter
bbfa77dcad
cp: replace assert!(false) with panic!()
2023-06-02 16:43:45 +02:00
Sylvestre Ledru
20ce7accf2
cp: -i prompts in the right place
...
Should fix tests/cp/cp-i.sh
2023-06-01 21:42:35 +02:00
Sylvestre Ledru
4eb1e847e9
cp --no-clobber should fail
2023-06-01 21:42:32 +02:00
Terts Diepraam
701f30a15e
Merge pull request #4909 from sylvestre/test_debug
...
Add support for `cp --debug`
2023-05-31 20:27:02 +02:00
John Shin
f10faf21bc
head: interpret size as decimal
2023-05-30 13:32:48 -07:00
John Shin
3ca003846d
shred: add support for hex and octal size
2023-05-30 13:56:01 +02:00
Daniel Hofstetter
191f2380b9
Merge pull request #4905 from sylvestre/mv-n
...
mv: Show 'skipped' when a file isn't overwriten
2023-05-30 07:27:48 +02:00
Sylvestre Ledru
f2006a9a6b
cp: add support of cp --debug
2023-05-29 22:44:57 +02:00
Sylvestre Ledru
d38797bb50
mv: Show 'skipped' when a file isn't overwriten
...
Should fix tests/mv/mv-n.sh
2023-05-29 21:57:42 +02:00
Ideflop
6c98b23e80
more: implement arguments -n/--lines and --number
2023-05-29 14:36:18 +02:00
GaryDev
4cc569f5f0
whoami: add test to improve coverage
...
* tests/whoami: add windows test for issue #4614
* tests/whoami issue #4614 : add all platform test
2023-05-29 07:34:19 +02:00
Kamil Ogórek
07434647ad
fix: Correctly detect format when using md5sum with check flag ( #4645 )
2023-05-27 23:56:15 +02:00
Sylvestre Ledru
388fa1b717
Merge pull request #4696 from jeddenlea/wc
...
wc: streaming --files0-from and other improvements
2023-05-27 23:55:16 +02:00
Sylvestre Ledru
e295cb7acb
Merge pull request #4903 from Ideflop/more_implement_squeeze
...
more: implement argument -s / --squeeze
2023-05-27 20:38:52 +02:00
jaggededgedjustice
81a854a13e
date: Catch format string that is not supported by chrono ( #4244 )
...
* Catch format string that is not supported by chrono
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-05-27 15:41:12 +02:00
Daniel Hofstetter
b248b9d34c
tail: disable some tests on Android
2023-05-27 08:02:03 +02:00
Ideflop
03dec5128c
more: implement argument -s / --squeeze
2023-05-27 00:04:04 +02:00
Daniel Hofstetter
79df3937c2
Merge pull request #4896 from shinhs0506/mkdir-test
...
Mkdir: explicit umask and sequential tests
2023-05-25 07:15:48 +02:00
John Shin
90ed91608e
mkdir: document why a mutex is necessary
2023-05-24 16:50:08 -07:00
Daniel Hofstetter
81e3b04b11
Merge pull request #4888 from Ludmuterol/more-panic-4886
...
fix(#4886 ) more: panics if file is not readable
2023-05-24 17:42:27 +02:00
tpeters
7cad501c2c
more: add output check to test
2023-05-24 16:32:29 +02:00
Ludmuterol
ccdb76aef7
more: Update tests/by-util/test_more.rs
...
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-24 15:57:55 +02:00
tpeters
53ffd55bdf
more: run test only on unix systems
2023-05-24 13:40:30 +02:00
Moïse Valvassori
b29f8b011b
chown: show "ownership of 'foo' retained" message
...
* Display a message when the owner is not changed.
* Display a message when the current user/group doesn't match those specified in the `--from` args.
* print messages to stdout
* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`
* fix chown tests: test stdout and not stderr
* factorize duplicate code in a function
* Display a message when the owner is not changed.
* Display a message when the current user/group doesn't match those specified in the `--from` args.
* print messages to stdout
* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`
* fix chown tests: test stdout and not stderr
* factorize duplicate code in a function
* display the retained ownership details according to the destination ownership.
2023-05-24 09:45:19 +02:00
John Shin
f8a5dbc41c
mkdir: run tests sequentially by adding a mutex
2023-05-23 15:56:51 -07:00
John Shin
c561074425
mkdir: explicitly set umask when testing mode
2023-05-23 15:45:04 -07:00
Sylvestre Ledru
9a6d47759b
Merge pull request #4890 from shinhs0506/rm-i
...
fix rm/interactive-always.sh
2023-05-23 18:59:37 +02:00
tpeters
50bff30c67
more: add test and change error type
2023-05-23 18:03:25 +02:00
Daniel Hofstetter
2f4b57ca97
mv: add missing semicolons to tests
2023-05-23 07:23:42 +02:00
John Shin
421b2f2581
rm: test prompts when --interactive is once
2023-05-22 21:27:43 -07:00
John Shin
eeb3341101
rm: add tests for --interactive with empty when
2023-05-22 21:23:44 -07:00
Sylvestre Ledru
92f4849b60
date: bring back the test
2023-05-22 23:29:55 +02:00
Jed Denlea
e5b46ea3eb
wc: more tests and fixes
...
My previous commits meant to bring our wc's output and behavior in line
with GNU's. There should be tests that check for these changes!
I found a stupid bug in my own changes, I was not adding 1 to the
indexes produced by .enumerate() when printing errors.
2023-05-22 01:02:35 -07:00
Sylvestre Ledru
08c71fc80c
Merge pull request #4880 from cakebaker/more_remove_empty_else_branches
...
more: remove empty "else"-branches in tests
2023-05-22 09:31:21 +02:00
Sylvestre Ledru
e5419ade96
Merge pull request #4878 from cakebaker/mktemp_4874
...
mktemp: prioritize TMPDIR over -p when using -t
2023-05-22 09:31:11 +02:00
Jed Denlea
c4b53a44b5
wc: make --files0-from work with streams
2023-05-21 23:59:32 -07:00
Sylvestre Ledru
c91520768e
Merge pull request #4876 from shinhs0506/mkdir-p
...
mkdir: set correct permissions on dirs created by -p
2023-05-22 07:43:52 +02:00
John Shin
33ac653ce5
mkdir: correctly set umask so that tests fail without the fix
2023-05-21 21:07:00 -07:00
Moïse Valvassori
0130a07579
chown: show message if file doesn't exist
...
* print the message "failed to change ownership of" when we try to change a non existing file.
* replace the 4-tuple returned by parse_gid_uid_and_filter by GidUidOwnerFilter struct.
* chain the test in one expression.
* chown: remove unused var "result" in test
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-21 17:54:32 +02:00
Jed Denlea
38b4825e7f
wc: avoid excess String allocations
...
print_stats will now take advantage of the buffer built into
io::stdout().
We can also waste fewer lines on show! by making a helper macro.
2023-05-20 23:08:26 -07:00
Daniel Hofstetter
e844bdfebe
more: remove empty "else"-branches in tests
2023-05-20 16:26:11 +02:00
Daniel Hofstetter
70765eea82
Merge pull request #4872 from Ideflop/more_implement_print_over_and_clean_print
...
more: add arguments print over and clean print
2023-05-20 15:32:50 +02:00
Ideflop
2d1a9f6709
fix behavior of -c and -p commands
2023-05-20 08:56:50 +02:00
Daniel Hofstetter
698fafad68
mktemp: prioritize TMPDIR over -p when using -t
2023-05-20 08:02:37 +02:00
Daniel Hofstetter
a01dc20c30
mktemp: remove TEST_TEMPLATE9
2023-05-19 10:42:52 +02:00
Daniel Hofstetter
5be5f85043
mktemp: simplify test_default_missing_value()
2023-05-19 10:38:04 +02:00
John Shin
f592dff46a
mkdir: skip setting dir permissions on windows
2023-05-18 19:34:57 -07:00
John Shin
5e1a6c1f13
mkdir: add test for checking mode of parent dirs with -p
2023-05-18 19:12:38 -07:00
Daniel Hofstetter
74e73bee06
Merge pull request #4832 from sylvestre/issue_4821
...
mktemp -t foo.XXXX should create in TMPDIR
2023-05-18 14:12:40 +02:00
Sylvestre Ledru
cd189b2391
Fix mktemp -t -p ~/projects/playground foo.XXXX
2023-05-18 11:08:55 +02:00
Sylvestre Ledru
35b5fd6a40
mktemp -t foo.XXXX should create in TMPDIR
2023-05-18 11:08:55 +02:00
Ideflop
1a12ffaa79
Add check for terminal in test_valid_arg() function
2023-05-18 09:18:33 +02:00
Jed Denlea
db5696f64b
rm: support non-UTF-8 paths
...
Addresses #4868 .
2023-05-17 23:01:21 -07:00
Ideflop
1ce52903b0
Merge branch 'uutils:main' into more_implement_print_over_and_clean_print
2023-05-17 22:47:07 +02:00
Ideflop
b676875c0c
more: add arguments print over and clean print
2023-05-17 20:38:03 +02:00
Jed Denlea
3870ee252a
yes: support non-UTF-8 args
...
Also, tighten the creation of the output buffer. Rather than copy "y\n"
8192 times, or any other input some number of times, it can be doubled
in place using Vec::extend_from_within.
2023-05-15 11:29:14 -07:00
Sylvestre Ledru
3e7594632b
ls: when facing an invalid utf-8, don't panic
...
Fails with
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid-\xE0-"', src/uu/ls/src/ls.rs:1932:53
```
2023-05-14 22:11:44 +02:00
Daniel Hofstetter
690fff2fc9
cksum: implement --untagged
2023-05-14 16:43:14 +02:00
John Shin
a817186e10
cp: preserve permissions on -r -p --parents
2023-05-12 11:34:51 -07:00
Sylvestre Ledru
64c49de0cc
Merge pull request #4432 from jfinkels/dd-nocache
...
dd: support the [io]flag=nocache option
2023-05-12 09:53:57 +02:00
Daniel Hofstetter
98fa941250
Merge pull request #4759 from sylvestre/clippy4
...
fix some clippy warnings in tests
2023-05-12 07:15:44 +02:00
Sylvestre Ledru
d98293bdaa
bring back the empty line
2023-05-11 18:20:28 +02:00
Sylvestre Ledru
536d12d20d
simplify code
...
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-11 18:19:49 +02:00
Sylvestre Ledru
22a7f98a47
Merge pull request #4856 from cakebaker/cksum_fix_algorithm_output
...
cksum: fix output of --algorithm
2023-05-11 18:18:24 +02:00
John Shin
7a31d841ba
cp: preserve permission on -p --parents ( #4853 )
2023-05-11 16:44:23 +02:00
Daniel Hofstetter
0781ad0a65
cksum: fix output of --algorithm
...
for the algorithms md5, sha[1,224,256,384,512], blake2b, and sm3 from
<digest> <filesize> <filename>
to
<algo name> (<filename>) = <digest>
to use the same format as GNU cksum
2023-05-11 14:24:43 +02:00
SteveLauC
452be5a220
ls: device number for BSDs and solarishOS ( #4841 )
2023-05-11 12:58:36 +02:00
leone
d8f1f1c16c
date: bugfix test_date_for_no_permission_file ( #4544 )
2023-05-10 18:40:58 +02:00
Daniel Hofstetter
ba6eb392aa
cksum: split test function into two
2023-05-10 09:48:32 +02:00
Daniel Hofstetter
d769871374
Merge pull request #4831 from sylvestre/mv-hardlink
...
mv: 'mv source hardlink' should fail
2023-05-08 16:12:23 +02:00
Sylvestre Ledru
48b8cfa595
mv: adjust the tests - duplicate code + android
...
According to:
https://stackoverflow.com/questions/44913985/creating-hardlinks-and-symlinks-in-android
hardlink aren't expected to work on android + fat
2023-05-08 15:24:47 +02:00
Sylvestre Ledru
594f81a88a
mv --backup=simple a b on hard links should not fail
...
touch a
ln a b
./target/debug/coreutils mv --backup=simple a b
GNU: tests/mv/hard-4.sh
2023-05-08 13:08:20 +02:00
Daniel Hofstetter
560ac3d6fb
dd: fix "unused imports" warning in tests
2023-05-08 07:59:56 +02:00
Sylvestre Ledru
a5a39b6ba8
mv: 'mv source hardlink' should fail
...
fixes: tests/mv/force.sh
2023-05-07 23:08:41 +02:00
Jeffrey Finkelstein
4ff318aee1
fixup! dd: support the [io]flag=nocache option
2023-05-07 16:33:21 -04:00
Jeffrey Finkelstein
bd18a2a344
dd: support the [io]flag=nocache option
...
Add support for the `iflag=nocache` and `oflag=nocache` to make `dd`
discard the filesystem cache for the processed portion of the input or
output file.
2023-05-07 11:43:13 -04:00
Sylvestre Ledru
b94d10f080
Fix some semicolon_if_nothing_returned
2023-05-06 19:35:44 +02:00
Daniel Hofstetter
93c8623da9
mv: if more than one of -i, -n, -f, latest "wins"
2023-05-05 15:17:37 +02:00
Daniel Hofstetter
4ee1118061
Merge pull request #4823 from shinhs0506/mv-i-dir-file
...
fix tests/mv/i-5.sh
2023-05-04 13:43:05 +02:00
John Shin
84567336a8
mv: update test case so it doesn't fail
2023-05-03 23:54:28 -07:00
Daniel Hofstetter
616a166e36
Merge pull request #4820 from sylvestre/thru-dangling-2
...
cp: fix cp -f f loop when loop is a symlink loop
2023-05-04 08:20:57 +02:00
John Shin
1c8aac0883
mv: return err if response is negative when moving a dir to existing dest during an interactive mode
2023-05-03 16:05:21 -07:00
Sylvestre Ledru
832fd2d2c6
cp: fix cp -f f loop when loop is a symlink loop
...
Fix: tests/cp/thru-dangling.sh
2023-05-03 19:54:35 +02:00
Daniel Hofstetter
a97199f72a
Merge pull request #4796 from shinhs0506/mv-cp-update
...
mv, cp: add support for --update=none,all,older
2023-05-03 15:21:21 +02:00
Daniel Hofstetter
923a62c6be
mv: fix function/file names in tests
2023-05-03 10:07:46 +02:00
Daniel Hofstetter
82eb04c5a9
Merge pull request #4777 from Joining7943/tail-change-text-static-to-const
...
'tail': Change static global variables to const
2023-05-03 09:31:34 +02:00
Sylvestre Ledru
aae3f2f99c
Ride along: fix some trivial clippy warnings
2023-05-02 23:22:39 +02:00
John Shin
8ad2fa3cc1
mv: write test for multiple update args
2023-05-02 13:46:43 -07:00
John Shin
918c36b485
cp: write test for multiple update args
2023-05-02 13:46:08 -07:00
John Shin
983fee0cea
cp: fix wrong test names for update
2023-05-02 13:35:52 -07:00
John Shin
c0e4e4f757
cp: simplify tests for update
2023-05-02 13:35:06 -07:00
John Shin
6a100976c7
mv: simplify tests for update
2023-05-02 13:30:38 -07:00
Sylvestre Ledru
e166d90db8
Merge pull request #4813 from cakebaker/bump_fundu_to_0_5_1_and_fix_tests
...
Bump fundu to 0.5.1 and fix tests
2023-05-02 12:09:48 +02:00
Daniel Hofstetter
3f8e21c36c
Merge pull request #4812 from sylvestre/thru-dangling
...
cp: add support POSIXLY_CORRECT=1 when dealing with dangling links
2023-05-02 10:00:18 +02:00
Daniel Hofstetter
ad37db8da3
sleep: fix broken tests due to fundu update
2023-05-01 14:25:59 +02:00
John Shin
66a9169e55
cp: fix typos
2023-05-01 03:54:56 -07:00
Sylvestre Ledru
2d4dfc3d7d
cp: add support POSIXLY_CORRECT=1 when dealing with dangling links
...
GNU: tests/cp/thru-dangling.sh
2023-05-01 11:05:00 +02:00
John Shin
85ded232bc
mv: resolve merge conflict
2023-04-30 20:09:32 -07:00
John Shin
78412c5a61
mv: add tests for --update
2023-04-30 19:29:49 -07:00
John Shin
ed3ff10540
cp: write tests for --update
2023-04-30 19:29:49 -07:00
Sylvestre Ledru
75e33695e5
Disable test_gnu_options on android
2023-04-30 20:08:06 +02:00
Sylvestre Ledru
9dff7d86cb
Disable test_factor::test_parallel on android
2023-04-29 21:29:47 +02:00
Sylvestre Ledru
53ae5c33c9
Disable test_sort::test_compress_fail (for real) & test_cp::test_cp_arg_interactive_update on android
2023-04-29 20:39:18 +02:00
Sylvestre Ledru
ac068e0487
Disable test_sort::test_compress_fail & test_chmod::test_mode_after_dash_dash on android
2023-04-29 19:23:56 +02:00
Sylvestre Ledru
4e712140fe
Do not run test_closes_file_descriptors on android
...
Closes : #4736
2023-04-29 18:48:15 +02:00
Sylvestre Ledru
c5fb6eac9f
Merge pull request #4794 from shinhs0506/mv-target-dir
...
mv: check if --target is a directory
2023-04-29 10:40:44 +02:00
Daniel Hofstetter
736a00a85f
paste: ignore failing test on Windows
2023-04-28 15:08:01 +02:00
Daniel Hofstetter
c254900db9
paste: handle list ending with unescaped backslash
2023-04-28 14:33:53 +02:00
John Shin
a93bccb5b9
mv: add tests for --target
2023-04-28 03:10:10 -07:00
Niyaz Nigmatullin
467cbf30de
[tests/ls] Support user names containing dots
...
- Fix regex's in tests for `ls -l`
2023-04-27 18:27:48 +03:00
Sylvestre Ledru
474d391eb1
Merge pull request #4790 from sylvestre/date_use_humantime_to_duration
...
date -d supports - 1 year ago, 2 second, etc
2023-04-26 23:54:49 +02:00
Sylvestre Ledru
360cbda0c5
Merge pull request #4782 from cakebaker/mv_no_clobber_behavior_change
...
mv: adapt -n behavior to GNU mv 9.3
2023-04-26 22:47:12 +02:00
Sylvestre Ledru
5a7eb5b3a3
Merge pull request #4783 from sunfishcode/sunfishcode/default-nice
...
Avoid spurious failures in the presence of non-zero default nice
2023-04-26 22:46:37 +02:00
Sylvestre Ledru
686ad2d6d2
Merge pull request #4784 from sunfishcode/sunfishcode/ls-order-time
...
Use `expected_result` in test_ls to avoid spurious failures
2023-04-26 22:46:06 +02:00
Sylvestre Ledru
825d240ef0
date -d supports - 1 year ago, 2 second, etc
2023-04-26 22:14:15 +02:00
Sylvestre Ledru
0f268428fe
Merge pull request #4379 from ZauJulio/hotfix-mktemp
...
mktemp: fix PrefixContainsDirSeparator verification
2023-04-26 18:28:56 +02:00
John Shin
d4630c83b4
mv: add 'renamed ' in the beginning when verbose flag is set
2023-04-25 21:27:52 -07:00
Dan Gohman
12686c478e
Avoid spurious failures in the presence of non-zero default nice
...
Make `test_get_current_niceness` query the libc nice value instead of
hard-coding a value of zero. This avoids a spurious failure on systems
which have a non-zero default nice value.
This fixes spurious failures on my machine.
2023-04-25 14:39:37 -07:00
Dan Gohman
eba000ddcc
Use expected_result
in test_ls to avoid spurious failures
...
As the existing comment says, the expected output here is dependent on
the platform, so use the `expected_result` utility to avoid hard-coding
specific results for each platform.
This fixes spurious failures on my machine.
2023-04-25 05:40:37 -07:00
Daniel Hofstetter
804274dbf4
mv: adapt -n behavior to GNU mv 9.3
2023-04-25 11:33:48 +02:00
Sylvestre Ledru
6115af6386
Merge pull request #4769 from sylvestre/touch
...
touch: improve support for dangling link
2023-04-25 08:26:23 +02:00
Sylvestre Ledru
d1aa1ac963
Use the humantime_to_duration crate
2023-04-24 22:23:07 +02:00
Sylvestre Ledru
84e0610487
touch: don't generate an error on 'touch -h -'
2023-04-24 12:03:21 +02:00
Sylvestre Ledru
aaea758b6a
touch: -h should not fail when running on broken symlink
...
Fixes more of tests/touch/no-dereference.sh
2023-04-24 12:03:21 +02:00
Sylvestre Ledru
c3656e561c
touch: -h -r should not fail when running on broken symlink
...
Fixes the beginning of:
tests/touch/no-dereference.sh
2023-04-24 12:03:21 +02:00
Joining7943
c6f6c87780
tests/tail: Change static global variables to const
2023-04-23 23:11:40 +02:00
Daniel Hofstetter
e94f1d8eb7
mv: -i show no error if overwriting is declined
2023-04-23 15:27:24 +02:00
Joining7943
ae60045f3f
tail: Fix printed header for stdin should be the same on all platforms
2023-04-21 21:55:28 +02:00
Daniel Hofstetter
7730c8171d
du: fix clippy warning in test
2023-04-21 17:01:40 +02:00
Sylvestre Ledru
efa361dd7c
Fix some trivial clippy warnings
2023-04-20 23:22:05 +02:00
Sylvestre Ledru
ab22f49feb
Merge pull request #4753 from cakebaker/fmt_cleanup_tests
...
fmt: cleanup tests
2023-04-20 17:55:55 +02:00
Daniel Hofstetter
72041568e7
fmt: cleanup tests
2023-04-20 15:22:26 +02:00
Terts Diepraam
d68fd68b5f
Merge pull request #4734 from Joining7943/tail-fix-args-parsing-follow-mode
...
tail/args: Fix parsing when -F is used together with --retry or --follow
2023-04-20 09:43:24 +02:00
Joining7943
20e32971dd
tail/args: Fix parsing when -F is used together with --retry or --follow
2023-04-18 21:47:20 +02:00
Ideflop
6a54d820ac
factor: add -h/--exponents option ( #4710 )
...
* factor: add -h/--exponents option
* Factor: Rebase, add -h/--exponents options
2023-04-14 21:20:19 +02:00
Sylvestre Ledru
47cb40c020
du: adjust test_du_basics_bad_name as we made it work
2023-04-13 13:27:04 +02:00
Sylvestre Ledru
eea8d40e78
du: add support of --dereference-args
...
Should fix tests/du/deref.sh
2023-04-13 13:27:04 +02:00
Sylvestre Ledru
5a1d9cec7e
du: an error code when done on a non existing file
2023-04-13 13:27:04 +02:00
Daniel Hofstetter
dd3c0f7fe9
Merge pull request #4729 from spineki/b2sum-missing-l-option
...
B2sum: add -l/--length option
2023-04-13 09:57:55 +02:00
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
Daniel Hofstetter
7a888da409
tests: remove all "extern crate" statements
2023-04-10 08:31:31 +02:00
Daniel Hofstetter
81b1bc1fa7
touch: remove unnecessary "extern crate"s
2023-04-08 16:34:29 +02:00
xalfer
19e456fe2a
touch: add support for --ref and --date together
...
This commit resolves issue #4608 .
To make it relatively straightforward to implement I have taken some
code from parse_date and put it inside a function parse_relative_time.
This commit changes and adds some test as well to work with the new
functionality.
2023-04-07 21:36:26 +02:00
Daniel Hofstetter
305087f8e2
factor: remove unnecessary "extern crate" in test
2023-04-06 14:52:54 +02:00
Daniel Hofstetter
74a95bc7a5
factor: expand glob import in test
2023-04-06 09:47:21 +02:00
Daniel Hofstetter
20a8b5ac9e
factor: fix "unused import" warning in test
2023-04-06 09:45:13 +02:00
Terts Diepraam
f82f92ec9f
Merge pull request #4672 from sylvestre/dircolors
...
dircolors: trigger an error when used on /
2023-04-05 00:01:19 +02:00
Daniel Hofstetter
b8eb9d3552
wc: use concat! to improve readability of tests
2023-04-04 16:36:49 +02:00
Daniel Hofstetter
0fa08757fa
wc: implement --total
2023-03-31 08:16:46 +02:00
Surya Teja K
b14d19770f
date: show error when reading dirs for -f arg ( #4572 )
...
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-03-29 07:49:14 +02:00
0xMRTT
e7ef9dcd46
hashsum
: add --zero
option (#4612 ) ( #4632 )
...
* `hashsum`: add `--zero` option (#4612 )
2023-03-28 23:26:11 +02:00
Sylvestre Ledru
d29f9f2e30
dircolors: trigger an error when used on /
2023-03-28 22:54:16 +02:00
Sylvestre Ledru
6a69894f60
Merge pull request #4297 from jfinkels/mktemp-uncomment-fixed-test
...
mktemp: uncomment fixed test case
2023-03-27 21:11:29 +02:00
Daniel Hofstetter
089e645e3b
Merge pull request #4637 from haciek/du_threshold_err_fix
...
du: threshold error message fix
2023-03-27 16:32:30 +02:00
Maciej Habasiński
d277603bf1
du: fmt fix
2023-03-26 23:38:31 +02:00