summaryrefslogtreecommitdiff
path: root/tests/mv/mv-n.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mv/mv-n.sh')
-rwxr-xr-xtests/mv/mv-n.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/mv/mv-n.sh b/tests/mv/mv-n.sh
index fbf571368..45d74eb93 100755
--- a/tests/mv/mv-n.sh
+++ b/tests/mv/mv-n.sh
@@ -23,12 +23,14 @@ print_ver_ mv
# test miscellaneous combinations of -f -i -n parameters
touch a b || framework_failure_
echo "renamed 'a' -> 'b'" > out_move
+echo "skipped 'b'" > out_skip || framework_failure_
+echo "mv: not replacing 'b'" > err_skip || framework_failure_
> out_empty
# ask for overwrite, answer no
touch a b || framework_failure_
echo n | returns_ 1 mv -vi a b 2>/dev/null > out1 || fail=1
-compare out1 out_empty || fail=1
+compare out1 out_skip || fail=1
# ask for overwrite, answer yes
touch a b || framework_failure_
@@ -38,17 +40,23 @@ compare out2 out_move || fail=1
# -n wins (as the last option)
touch a b || framework_failure_
echo y | returns_ 1 mv -vin a b 2>/dev/null > out3 || fail=1
+compare out3 out_skip || fail=1
+
+# -n wins (non verbose)
+touch a b || framework_failure_
+echo y | returns_ 1 mv -in a b 2>err3 > out3 || fail=1
compare out3 out_empty || fail=1
+compare err3 err_skip || fail=1
# -n wins (as the last option)
touch a b || framework_failure_
echo y | returns_ 1 mv -vfn a b 2>/dev/null > out4 || fail=1
-compare out4 out_empty || fail=1
+compare out4 out_skip || fail=1
# -n wins (as the last option)
touch a b || framework_failure_
echo y | returns_ 1 mv -vifn a b 2>/dev/null > out5 || fail=1
-compare out5 out_empty || fail=1
+compare out5 out_skip || fail=1
# options --backup and --no-clobber are mutually exclusive
touch a || framework_failure_