Commit graph

35 commits

Author SHA1 Message Date
David Matos
dd4299c32e chmod: supress verbose output when not verbose 2023-02-20 22:18:07 +01:00
David Matos
946c8d2d4a chmod: change permissions for files present even when there is a missing file 2023-02-16 23:13:06 +01:00
Daniel Hofstetter
f6b646e4e5 clippy: fix warnings introduced with Rust 1.67.0 2023-01-27 17:37:56 +01:00
Joining7943
1fadeb43b2 tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.
Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
2023-01-22 14:56:19 +01:00
Sylvestre Ledru
6e14dea73b Fix some clippy warnings
Fixed with `cargo clippy --features unix  --fix`
and manually
2022-10-13 09:07:22 +02:00
Terts Diepraam
9177cb7b24 all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
Jamie Quigley
1a270361c0
Replace lazy_static with once_cell 2022-07-12 14:08:30 +01:00
Terts Diepraam
18369dc0be all: use array intoiterator 2022-04-05 10:39:31 +02:00
xxyzz
ce385be575
chmod: ignore symbolic links during recursive directory traversal 2022-03-06 09:38:39 +08:00
xxyzz
3272a590db
test_chmod: update expected results of test_chmod_recursive
The test succeeds before because the files are read before the permission change and that's inconsistent with GNU chmod.
2022-03-06 08:40:36 +08:00
xxyzz
9083f236da
test_chmod: add read permission recursively test 2022-03-06 08:40:36 +08:00
Daniel Eades
a2d5f06be4 remove needless pass by value 2022-01-30 15:08:26 +01:00
Thomas Queiroz
fed596a23b
tests/chmod: change normal error to usage error 2021-11-12 19:07:37 -03:00
James Robson
0b2483452a Add symbolic mode support to mkdir 2021-10-16 12:57:55 +01:00
Michael Debertol
5121e2eec1 chmod: add check for quiet 2021-08-25 13:52:09 +02:00
Michael Debertol
5825889931 chmod: correctly handle modes after -- 2021-08-25 13:52:09 +02:00
Michael Debertol
b841a11421 chmod: fail if the operand list is empty 2021-08-25 13:52:09 +02:00
Michael Debertol
945e57ea22 chmod: show an error if a permission wasn't removed due to umask 2021-08-25 13:52:09 +02:00
Michael Debertol
15b40f6aa2 chmod: implement special handling of directory setuid/setgid 2021-08-25 13:52:09 +02:00
Michael Debertol
74958794c6 chmod: print change message to stdout, not stderr 2021-08-25 13:52:09 +02:00
Michael Debertol
080998b6ef chmod: pad all file modes to 4 digits 2021-08-25 13:52:09 +02:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Jan Scheer
3aeccfd802 fix a lot of clippy warnings 2021-05-29 15:11:22 +02:00
Dean Li
fe25b51a66
chmod: match GNU error
Related to #2260

Signed-off-by: Dean Li <deantvv@gmail.com>
2021-05-26 22:31:02 +08:00
Yağız can Değirmenci
071899d24d tests: delete 'error:' prefix from the tests 2021-05-26 02:45:53 +03:00
Jan Scheer
646c6cacbc refactor tests (#1982) 2021-04-23 02:28:46 +02:00
Sylvestre Ledru
c5b43c0994 rustfmt the recent change 2021-04-17 13:21:30 +02:00
Gilad Naaman
81d42aa2b3 Fix some tests to not use CmdResult fields 2021-04-10 23:30:50 +03:00
Mikadore
b8079098f2 fixed panic! formatting 2021-03-31 13:30:06 +02:00
Jan Scheer
2647a72e9e chmod: fixed behavior for dangling symlinks (#1775) 2021-03-29 22:07:09 +02:00
Jan Scheer
a9a3794d5a chmod: add tests 2021-03-28 20:56:37 +02:00
Sylvestre Ledru
18370f39b8 Remove some warnings 2021-01-22 09:40:38 +01:00
Sylvestre Ledru
013bb285cd
bug(chmod): chmod on symlink pointing to non existing file is failing (#1694) 2021-01-18 23:09:00 +01:00
Sylvestre Ledru
576aa29f0f
refactor(chmod): move from walker to walkdir, simplify the code and add tests (#1645) 2020-12-12 10:31:12 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_chmod.rs (Browse further)