diff options
author | Jim Meyering <jim@meyering.net> | 2001-01-14 11:05:50 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-01-14 11:05:50 +0000 |
commit | c6a4fe00dbc12706796da65e4d3915af663b1b55 (patch) | |
tree | 80713a8b72f4340ce191c2b51020b2ffcaafb0e6 | |
parent | 30fc8c55a3019abb1f01cf3580e04af700d490d9 (diff) | |
download | coreutils-c6a4fe00dbc12706796da65e4d3915af663b1b55.tar.xz |
from Volker Borchert
-rwxr-xr-x | tests/mv/trailing-slash | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash new file mode 100755 index 000000000..8658e17e7 --- /dev/null +++ b/tests/mv/trailing-slash @@ -0,0 +1,31 @@ +#!/bin/sh +# On some operating systems, e.g. SunOS-4.1.1_U1 on sun3x, +# rename() doesn't accept trailing slashes. + +if test "$VERBOSE" = yes; then + set -x + mv --version +fi + +pwd=`pwd` +tmp=mv-tslash.$$ +trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 + +. $srcdir/../envvar-check + +framework_failure=0 +mkdir $tmp || framework_failure=1 +cd $tmp || framework_failure=1 +mkdir foo || framework_failure=1 + +if test $framework_failure = 1; then + echo 'failure in testing framework' + exit 1 +fi + +fail=0 + +mv foo/ bar || fail=1 + +(exit $fail); exit |