diff options
author | Jim Meyering <jim@meyering.net> | 2001-11-22 15:49:32 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-11-22 15:49:32 +0000 |
commit | 746246f20f7d92550460d09bb706216bd8be45dd (patch) | |
tree | 61ce71fffaf97d95e33fe684558981bc4391716d /tests/mv | |
parent | 8faf6cb7178937d1a1221260c606b009eee313e9 (diff) | |
download | coreutils-746246f20f7d92550460d09bb706216bd8be45dd.tar.xz |
more tests
Diffstat (limited to 'tests/mv')
-rwxr-xr-x | tests/mv/dup-source | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/mv/dup-source b/tests/mv/dup-source index 58dba1495..3a0a6fd42 100755 --- a/tests/mv/dup-source +++ b/tests/mv/dup-source @@ -37,16 +37,25 @@ for i in cp; do $i a a d/ 2> out || fail=1 rm -fr a d; touch a; mkdir d $i ./a a d/ 2>> out || fail=1 + + # cp succeeds with --backup=numbered. + rm -fr a d; touch a; mkdir d + $i --backup=numbered a a d/ 2>> out || fail=1 + + # But not with plain `--backup' + rm -fr a d; touch a; mkdir d + $i --backup a a d/ 2>> out && fail=1 cat <<EOF > exp $i: warning: source file \`a' specified more than once $i: warning: source file \`a' specified more than once +$i: will not overwrite just-created \`d/a' with \`a' EOF cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null done for i in mv; do - # But mv *must* fail in this case. + # But mv *does* fail in this case (it has to). rm -fr a d; touch a; mkdir d $i a a d/ 2> out && fail=1 |