2 # vim: filetype=sh noexpandtab ts=8 sw=8
3 # $FreeBSD: head/tools/regression/pjdfstest/tests/rename/20.t 211352 2010-08-15 21:24:17Z pjd $
5 desc="rename returns EEXIST or ENOTEMPTY if the 'to' argument is a directory and is not empty"
16 expect 0 mkdir ${n0} 0755
17 expect 0 mkdir ${n1} 0755
19 for type in regular dir fifo block char socket symlink; do
20 create_file ${type} ${n1}/${n2}
21 expect "EEXIST|ENOTEMPTY" rename ${n0} ${n1}
22 if [ "${type}" = "dir" ]; then
23 expect 0 rmdir ${n1}/${n2}
25 expect 0 unlink ${n1}/${n2}