coreutils/tests/by-util
Emil Suleymanov 50c1833c11
cp: require preserve only certain attributes (#4099)
* cp: require preserve only certain attributes

# Conflicts:
#	src/uu/cp/src/copydir.rs
#	src/uu/cp/src/cp.rs

* tests/cp: preserve all and preserve xattr tests with todos

* tests/cp: rename preserve tests

* tests/cp: add android fail test for preserve=xattr

On Android, this cp with explicit preserve of xattr must fail, because of the limitations of the filesystem setup used on Android.

* cp: verify some metadata in cp preserve tests

# Conflicts:
#	tests/by-util/test_cp.rs

* cp: run test_cp_preserve_all in all OS's but only check metadata on linux

* test/cp: don't expect the mode to change in explicit cp preserve

* cp: attributes struct instead of enum for unified required tracking

* cp: refactor preserver and handle_preserve

# Conflicts:
#	src/uu/cp/src/cp.rs

* cp: update preserve attr to max

* test/cp: fix the preserve xattr test

Access timestamps appear to be modified only in this test. Running the command directly does not alter the access timestamp.

* cp/test: preserve all and context case

* cp: fix preserve args value source

* test/cp: don't check mtime on freebsd

* test/cp: don't check mtime on macos

* test/cp: fix freebsd deps

* test/cp: support freebsd tests

* cp: simplify try_set_from_string

* cp: parse context attr in preserve in any case to show warning later

* cp: print warnings for attribute errors if not required

* cp: show SELinux warning only once

* cp: show SELinux warning without error

* Revert "cp: show SELinux warning without error"

This reverts commit d130cf0d8c8e28ac2c903413992613241decf879.

* cp: add documentation for preserve components

* cp: simplify try_set_from_string

* cp: EN_US "behavior" spelling for cspell
2023-01-19 13:02:06 +01:00
..
test_arch.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_base32.rs base{32, 64, enc}: update to clap 4 2022-10-13 16:22:24 +02:00
test_base64.rs base{32, 64, enc}: update to clap 4 2022-10-13 16:22:24 +02:00
test_basename.rs basename: update to clap 4 2022-10-13 16:22:45 +02:00
test_basenc.rs basenc: add utility 2021-08-06 00:07:19 +02:00
test_cat.rs tests: Adjust some tests to use improved UChild. test_tac: Ignore pipe tests on windows. 2022-12-02 13:13:10 +01:00
test_chcon.rs all: use array intoiterator 2022-04-05 10:39:31 +02:00
test_chgrp.rs chgrp: update to clap 4 2022-10-13 17:50:23 +02:00
test_chmod.rs Fix some clippy warnings 2022-10-13 09:07:22 +02:00
test_chown.rs Merge pull request #4081 from sylvestre/chown-sep 2022-10-26 11:24:35 +02:00
test_chroot.rs chroot: improve support of --skip-chdir 2022-10-10 14:07:45 +02:00
test_cksum.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_comm.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_cp.rs cp: require preserve only certain attributes (#4099) 2023-01-19 13:02:06 +01:00
test_csplit.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_cut.rs fix clippy complaint 2022-12-13 20:34:01 -05:00
test_date.rs date: Catch panic from invalid format string (#4240) 2022-12-25 21:11:34 +01:00
test_dd.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_df.rs df: remove trailing spaces in rightmost column (#3882) 2022-09-22 08:37:20 +02:00
test_dir.rs unix_sockets is deprecated, use std::os::unix::net instead 2022-08-20 17:02:29 +03:00
test_dircolors.rs dircolors: align TERM matching behavior with that of GNU dircolors 2022-10-09 18:47:20 -07:00
test_dirname.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_du.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_echo.rs Allow echo with escapes to work with \0 2022-01-30 17:24:29 -05:00
test_env.rs Fix "needless borrow" clippy warning in env test 2022-11-04 11:10:35 +01:00
test_expand.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_expr.rs tests: remove status_code, which is the same as code_is 2023-01-01 17:25:59 +01:00
test_factor.rs tests: Set timeout for tests which would fail with the default timeout in test_factor, test_sort 2022-12-17 21:55:01 +01:00
test_false.rs false,true: Implement custom help, version 2022-02-01 14:29:26 +01:00
test_fmt.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_fold.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_groups.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_hashsum.rs hashsum: enable testing --no-names 2022-10-26 11:10:26 +02:00
test_head.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_hostid.rs Refactored tests for more utilities 2021-04-18 02:32:43 +03:00
test_hostname.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_id.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_install.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_join.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_kill.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_link.rs link: update to clap 4 2022-10-13 17:50:33 +02:00
test_ln.rs ln: use uucore::prompt_yes over custom function 2022-11-17 15:10:26 +01:00
test_logname.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_ls.rs chore: standardize creation of empty strings 2022-12-01 13:49:23 +01:00
test_mkdir.rs tests: fixed some tests on Windows 2022-10-18 10:00:28 +03:00
test_mkfifo.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_mknod.rs tests: remove status_code, which is the same as code_is 2023-01-01 17:25:59 +01:00
test_mktemp.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_more.rs tests: use CmdResult::usage_error 2021-11-09 17:37:05 -03:00
test_mv.rs mv: use uucore::prompt_yes over custom function 2022-11-17 15:11:19 +01:00
test_nice.rs nice: set exit code for clap errors to 125 2022-05-04 21:32:14 +02:00
test_nl.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_nohup.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_nproc.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_numfmt.rs numfmt: allow ' ' as field separator 2022-11-01 10:04:46 +01:00
test_od.rs Fix some clippy warnings 2022-10-13 09:07:22 +02:00
test_paste.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_pathchk.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_pinky.rs chore: standardize creation of empty strings 2022-12-01 13:49:23 +01:00
test_pr.rs pr: use clap to handle help & version 2022-09-12 15:28:08 +02:00
test_printenv.rs Weird env variable names should trigger an error. 2022-11-06 17:35:00 +01:00
test_printf.rs printf: Default left-justify integer conversion to 1 width 2022-05-01 20:00:09 +02:00
test_ptx.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_pwd.rs pwd: support the env variable 'POSIXLY_CORRECT' 2022-10-26 11:40:46 +02:00
test_readlink.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_realpath.rs realpath: require arguments again 2022-10-13 20:06:27 +02:00
test_relpath.rs fix Rust 1.59 clippy lints 2022-02-25 09:39:48 +01:00
test_rm.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_rmdir.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_runcon.rs all: use array intoiterator 2022-04-05 10:39:31 +02:00
test_seq.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_shred.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_shuf.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_sleep.rs test/sleep: add and refine sleep test cases 2023-01-08 12:10:32 -06:00
test_sort.rs tests: remove status_code, which is the same as code_is 2023-01-01 17:25:59 +01:00
test_split.rs chore: run cargo +nightly clippy --fix 2022-11-16 11:09:44 +02:00
test_stat.rs stat: move unit tests to stat.rs instead of test_stat.rs 2022-11-16 21:17:39 +01:00
test_stdbuf.rs stdbuf: update to clap 4 2022-10-13 17:50:40 +02:00
test_stty.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_sum.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_sync.rs fix: address test failures 2022-11-04 13:35:54 +03:00
test_tac.rs tests: Adjust some tests to use improved UChild. test_tac: Ignore pipe tests on windows. 2022-12-02 13:13:10 +01:00
test_tail.rs tests/tail: Remove redundant set_stdin(Stdio::null()) 2023-01-03 16:30:12 +01:00
test_tee.rs tests/util: Use Stdio::null as default in UCommand for Child stdin instead of Stdio::piped 2023-01-03 16:30:08 +01:00
test_test.rs tests: remove status_code, which is the same as code_is 2023-01-01 17:25:59 +01:00
test_timeout.rs tests: remove status_code, which is the same as code_is 2023-01-01 17:25:59 +01:00
test_touch.rs tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
test_tr.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_true.rs false,true: Implement custom help, version 2022-02-01 14:29:26 +01:00
test_truncate.rs truncate: update to clap 4 2022-10-13 17:50:43 +02:00
test_tsort.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_tty.rs tests: Use UChild in tests. Rename run_no_wait_child to run_no_wait and return UChild 2022-12-02 08:06:45 +01:00
test_uname.rs test/uname ~ test for invisible characters in output (ie, NULs) 2023-01-14 22:16:41 -06:00
test_unexpand.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_uniq.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_unlink.rs unlink: update to clap 4 2022-10-13 17:50:43 +02:00
test_uptime.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_users.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_vdir.rs unix_sockets is deprecated, use std::os::unix::net instead 2022-08-20 17:02:29 +03:00
test_wc.rs Fix some clippy warnings 2022-10-13 09:07:22 +02:00
test_who.rs who: update to clap 4 2022-10-13 17:50:43 +02:00
test_whoami.rs all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
test_yes.rs tests/util: Improve UChild. Cleanup redundant functions in util.rs. 2022-12-02 08:06:48 +01:00