blob: 0a86a1d81ce7fc3da8a8fc98451fdc1aae8880e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#! /bin/sh
: ${LS=ls}
: ${MV=mv}
: ${MKDIR=mkdir}
: ${MKNOD=mknod}
: ${RM=rm}
: ${TOUCH=touch}
. $srcdir/setup
if test -z "$other_partition_tmpdir"; then
exit 77
fi
null=.mv-null
dir=.mv-dir
framework_failure=0
$RM -f $null || framework_failure=1
$MKNOD $null p || framework_failure=1
$MKDIR -p $dir/a/b/c $dir/d/e/f || framework_failure=1
$TOUCH $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
exit 1
fi
fail=0
$MV $null $dir $other_partition_tmpdir || fail=1
# Make sure the files are gone.
test -f $null && fail=1
test -d $dir && fail=1
# Make sure they were moved.
# Since `test -e' is not portable, use `ls'.
$LS $other_partition_tmpdir/$null > /dev/null || fail=1
test -d $other_partition_tmpdir/$dir/a/b/c || fail=1
# cd $other_partition_tmpdir
# $LS -l -A -R $other_partition_tmpdir
$RM -rf $null $dir $other_partition_tmpdir
exit $fail
|