mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-11 11:37:48 +02:00
more tests
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user