#!/bin/sh
# dev-tc.sh : test case for Linux Annex /dev   directory

##########################################################################
# (C) Copyright 1998-2001 The Open Group
#
# All rights reserved.  No part of this source code may be reproduced,
# stored in a retrieval system, or transmitted, in any form or by any
# means, electronic, mechanical, photocopying, recording or otherwise,
# except as stated in the end-user licence agreement, without the prior
# permission of the copyright owners.
#
# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
# the UK and other countries.
#
#	PROJECT:	LSB-FHS
#	PRODUCT:	LSB.fhs/linux/dev/dev-tc.sh
#	AUTHOR:		Andrew Josey, The Open Group
#	DATE CREATED:	21 Dec 1998
##########################################################################


# This is 1.3
#
# dev-tc.sh,v
# Revision 1.3  2000/04/23 14:13:30  cyeoh
# Update tests for 6.1.3-(19/20/21) to accept links to fd/X since
# /dev/fd is a symlink to /proc/self/fd (tested in 6.1.3-18)
#
# Revision 1.2  2000/04/09 06:31:53  cyeoh
# Add CVS header information
#
#

tet_startup="startup"			# startup function
tet_cleanup="cleanup"			# cleanup function
iclist="ic3 ic5 ic11"
ic1="tp1"
ic2="tp2"
ic3="tp3"


tp1()
{
	tpstart "Reference 6.1.3-3(A)"
	tet_infoline "The /dev/null  device exists"
	if [ ! -r /dev/null ]
	then
	    tet_infoline "device not found or not readable"
	    FAIL=Y
	fi
	tpresult			# set result code
}
tp2()
{
	tpstart "Reference 6.1.3-2(A)"
	tet_infoline "The /dev/zero  device exists"
	if [ ! -r /dev/zero ]
	then
	    tet_infoline "device not found or not readable"
	    FAIL=Y
	fi
	tpresult			# set result code
}

tp3()
{
	tpstart "Reference 6.1.3-3(A)"
	tet_infoline "The /dev/tty  device exists"
	if [ ! -r /dev/tty ]
	then
	    tet_infoline "device not found or not readable"
	    FAIL=Y
	fi
	tpresult			# set result code
}

startup() # startup function
{
     rm -f out.stdout out.stderr out.experr dev.out fail.out >/dev/null 2>&1
}


cleanup() # clean-up function
{
     rm -f out.stdout out.stderr out.experr dev.out fail.out >/dev/null 2>&1
}

# source common shell functions

. $TET_EXECUTE/LIB/shfuncs.sh
. $TET_EXECUTE/LIB/lsbfuncs.sh

# execute shell test case manager - must be last line
. $TET_ROOT/lib/xpg3sh/tcm.sh
