diff options
author | Jim Meyering <jim@meyering.net> | 2001-08-07 11:31:06 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-08-07 11:31:06 +0000 |
commit | ea9d247693960c0d42e44b7c92eb3cdff4fb349c (patch) | |
tree | e618122ec081ab7af4f326d71d8667c648f7872a /tests/mv/update | |
parent | 65cb579ccce8093d65665864162ad991ae339db5 (diff) | |
download | coreutils-ea9d247693960c0d42e44b7c92eb3cdff4fb349c.tar.xz |
test both cp and mv
Diffstat (limited to 'tests/mv/update')
-rwxr-xr-x | tests/mv/update | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/mv/update b/tests/mv/update index 4a3c2f551..768ccefe2 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -3,6 +3,7 @@ if test "$VERBOSE" = yes; then set -x + cp --version mv --version fi @@ -28,14 +29,21 @@ fi fail=0 -# This is a no-op. -mv --update old new || fail=1 -case "`cat new`" in new) ;; *) fail=1 ;; esac -case "`cat old`" in old) ;; *) fail=1 ;; esac +for cp_or_mv in cp mv; do + # This is a no-op. + $cp_or_mv --update old new || fail=1 + case "`cat new`" in new) ;; *) fail=1 ;; esac + case "`cat old`" in old) ;; *) fail=1 ;; esac +done -# This will actually do the rename. +# This will actually perform the rename. mv --update new old || fail=1 test -f new && fail=1 case "`cat old`" in new) ;; *) fail=1 ;; esac +# This will actually perform the copy. +cp --update new old || fail=1 +case "`cat old`" in new) ;; *) fail=1 ;; esac +case "`cat new`" in new) ;; *) fail=1 ;; esac + (exit $fail); exit |