turns printfs back on
[freebsd-src/fkvm-freebsd.git] / tools / regression / fstest / tests / rename / 13.t
blob5697311e86b949bc434c0695bf2b5ee62e80ac7e
1 #!/bin/sh
2 # $FreeBSD$
4 desc="rename returns ENOTDIR when the 'from' argument is a directory, but 'to' 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 ENOTDIR rename ${n0} ${n1}
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 ENOTDIR rename ${n0} ${n1}
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 ENOTDIR rename ${n0} ${n1}
30 expect dir lstat ${n0} type
31 expect symlink lstat ${n1} type
32 expect 0 unlink ${n1}
34 expect 0 rmdir ${n0}