diff options
author | Pádraig Brady <P@draigBrady.com> | 2016-11-19 11:26:43 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-11-19 17:05:33 +0000 |
commit | f1799198483171c8565a4ff8fc1205d0a52fce37 (patch) | |
tree | fcd58921c28ced224cf33f7c4cb45871a385ae91 /tests/install | |
parent | 0c5cc8384a84ad39f7788ed1c5092bc14a0431ce (diff) | |
download | coreutils-f1799198483171c8565a4ff8fc1205d0a52fce37.tar.xz |
cp: improve status message when omitting directories
* src/copy.h (cp_options): Add a new flag for install(1).
* src/copy.c (copy_internal): For cp, also output remediation
advice which also indicates why directories aren't copied by default.
The message is unchanged for install(1).
* src/cp.c (cp_option_init): Init install_mode to false.
* src/mv.c (cp_option_init): Likewise.
* src/install.c (cp_option_init): Init install_mode to true.
* tests/install/basic-1.sh: Add a test case.
* tests/cp/link-deref.sh: Adjust test case.
Fixes http://bugs.gnu.org/24958
Diffstat (limited to 'tests/install')
-rwxr-xr-x | tests/install/basic-1.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/install/basic-1.sh b/tests/install/basic-1.sh index 23a2d581f..1a7147c1f 100755 --- a/tests/install/basic-1.sh +++ b/tests/install/basic-1.sh @@ -143,4 +143,9 @@ compare - out <<\EOF || fail=1 'file' -> 'sub4/dir_exists/file' EOF +# Ensure omitted directories are diagnosed +returns_ 1 ginstall . . 2>err || fail=1 +printf '%s\n' "ginstall: omitting directory '.'" >exp || framework_failure_ +compare exp err || fail=1 + Exit $fail |