]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/fstest/tests/rename/14.t
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / fstest / tests / rename / 14.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 desc="rename returns EISDIR when the 'to' argument is a directory, but 'from' is not a directory"
5
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
8
9 echo "1..17"
10
11 n0=`namegen`
12 n1=`namegen`
13
14 expect 0 mkdir ${n0} 0755
15
16 expect 0 create ${n1} 0644
17 expect EISDIR rename ${n1} ${n0}
18 expect dir lstat ${n0} type
19 expect regular lstat ${n1} type
20 expect 0 unlink ${n1}
21
22 expect 0 mkfifo ${n1} 0644
23 expect EISDIR rename ${n1} ${n0}
24 expect dir lstat ${n0} type
25 expect fifo lstat ${n1} type
26 expect 0 unlink ${n1}
27
28 expect 0 symlink test ${n1}
29 expect EISDIR rename ${n1} ${n0}
30 expect dir lstat ${n0} type
31 expect symlink lstat ${n1} type
32 expect 0 unlink ${n1}
33
34 expect 0 rmdir ${n0}