turns printfs back on
[freebsd-src/fkvm-freebsd.git] / tools / regression / fstest / tests / rename / 14.t
blob806e09d9ed64f2141748dfabc90e5f1ae4a618e6
1 #!/bin/sh
2 # $FreeBSD$
4 desc="rename returns EISDIR when the 'to' argument is a directory, but 'from' is not a directory"
6 dir=`dirname $0`
7 . ${dir}/../misc.sh
9 echo "1..17"
11 n0=`namegen`
12 n1=`namegen`
14 expect 0 mkdir ${n0} 0755
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}
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}
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}
34 expect 0 rmdir ${n0}