12786Ssos#!/bin/sh 22786Ssos# $FreeBSD: head/tools/regression/pjdfstest/tests/rename/13.t 211352 2010-08-15 21:24:17Z pjd $ 32786Ssos 42786Ssosdesc="rename returns ENOTDIR when the 'from' argument is a directory, but 'to' is not a directory" 52786Ssos 62786Ssosdir=`dirname $0` 72786Ssos. ${dir}/../misc.sh 82786Ssos 92786Ssosecho "1..32" 102786Ssos 112786Ssosn0=`namegen` 122786Ssosn1=`namegen` 132786Ssos 142786Ssosexpect 0 mkdir ${n0} 0755 152786Ssos 162786Ssosfor type in regular fifo block char socket symlink; do 172786Ssos create_file ${type} ${n1} 182786Ssos expect ENOTDIR rename ${n0} ${n1} 197420Ssos expect dir lstat ${n0} type 204686Sache expect ${type} lstat ${n1} type 212786Ssos expect 0 unlink ${n1} 222786Ssosdone 232786Ssos 242786Ssosexpect 0 rmdir ${n0} 252786Ssos