xref: /freebsd/crypto/openssh/regress/sftp-glob.sh (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1#	$OpenBSD: sftp-glob.sh,v 1.1 2004/12/10 01:31:30 fgsch Exp $
2#	Placed in the Public Domain.
3
4tid="sftp glob"
5
6BASE=${OBJ}/glob
7DIR=${BASE}/dir
8DATA=${DIR}/file
9
10rm -rf ${BASE}
11mkdir -p ${DIR}
12touch ${DATA}
13
14verbose "$tid: ls file"
15echo "ls -l ${DIR}/fil*" | ${SFTP} -P ${SFTPSERVER} 2>/dev/null | \
16	grep ${DATA} >/dev/null 2>&1
17if [ $? -ne 0 ]; then
18	fail "globbed ls file failed"
19fi
20
21verbose "$tid: ls dir"
22echo "ls -l ${BASE}/d*" | ${SFTP} -P ${SFTPSERVER} 2>/dev/null | \
23	grep file >/dev/null 2>&1
24if [ $? -ne 0 ]; then
25	fail "globbed ls dir failed"
26fi
27
28rm -rf ${BASE}
29