3 if test "$VERBOSE" = yes; then
10 trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0
11 trap '(exit $?); exit' 1 2 13 15
14 . $srcdir/../envvar-check
15 # Make sure we get English translations.
16 . $srcdir/../lang-default
18 if test -z "$other_partition_tmpdir"; then
26 mkdir $tmp || framework_failure=1
27 cd $tmp || framework_failure=1
28 rm -f $null || framework_failure=1
29 mknod $null p || framework_failure=1
30 test -p $null || framework_failure=1
31 mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure=1
32 touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure=1
34 if test $framework_failure = 1; then
35 echo '********************************************'
36 echo 'NOTICE: unable to create test prerequisites'
37 echo '********************************************'
38 # exit 77 here to indicate that we couldn't run the test.
39 # At least running on SunOS 4.1.4, using a directory NFS mounted
40 # from an OpenBSD system, the above mknod fails.
45 mv --verbose $null $dir $other_partition_tmpdir > out || fail=1
46 # Make sure the files are gone.
47 test -p $null && fail=1
48 test -d $dir && fail=1
49 # Make sure they were moved.
50 test -p $other_partition_tmpdir/$null || fail=1
51 test -d $other_partition_tmpdir/$dir/a/b/c || fail=1
53 # POSIX says rename (A, B) can succeed if A and B are on different file systems,
54 # so ignore chatter about when files are removed and copied rather than renamed.
57 s,$other_partition_tmpdir,XXX,
60 cat <<EOF | sort > exp
61 \`$null' -> \`XXX/$null'
62 \`$dir' -> \`XXX/$dir'
63 \`$dir/a' -> \`XXX/$dir/a'
64 \`$dir/a/b' -> \`XXX/$dir/a/b'
65 \`$dir/a/b/c' -> \`XXX/$dir/a/b/c'
66 \`$dir/a/b/c/file1' -> \`XXX/$dir/a/b/c/file1'
67 \`$dir/d' -> \`XXX/$dir/d'
68 \`$dir/d/e' -> \`XXX/$dir/d/e'
69 \`$dir/d/e/f' -> \`XXX/$dir/d/e/f'
70 \`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'
73 cmp out2 exp || fail=1
75 # cd $other_partition_tmpdir
76 # ls -l -A -R $other_partition_tmpdir
78 (exit $fail); exit $fail