#!/bin/sh
# local-tc.sh : test case for /usr/local directory

# This is 1.3
#
# local-tc.sh,v
# Revision 1.3  2000/04/14 10:38:14  ajosey
# renumber the assertions for FHS2.1
#
# Revision 1.2  2000/04/09 07:15:37  cyeoh
# Added CVS header information
#
#

tet_startup="startup"			# startup function
tet_cleanup="cleanup"			# cleanup function
iclist="ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8"
ic1="tp1"
ic2="tp2"
ic3="tp3"
ic4="tp4"
ic5="tp5"
ic6="tp6"
ic7="tp7"
ic8="tp8"


tp1()
{
	tpstart "Reference 4.9-1(A)"
	tet_infoline "The /usr/local directory exists and is searchable"
	lsb_test_dir_searchable /usr/local >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp2()
{
	tpstart "Reference 4.9-2(A)"
	tet_infoline "The /usr/local/bin directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/bin >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp3()
{
	tpstart "Reference 4.9-3(A)"
	tet_infoline "The /usr/local/games directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/games >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp4()
{
	tpstart "Reference 4.9-4(A)"
	tet_infoline "The /usr/local/include directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/include >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp5()
{
	tpstart "Reference 4.9-5(A)"
	tet_infoline "The /usr/local/lib directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/lib >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp6()
{
	tpstart "Reference 4.9-6(A)"
	tet_infoline "The /usr/local/sbin directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/sbin >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp7()
{
	tpstart "Reference 4.9-7(A)"
	tet_infoline "The /usr/local/share directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/share >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

tp8()
{
	tpstart "Reference 4.9-8(A)"
	tet_infoline "The /usr/local/src directory exists and is searchable"
	lsb_test_dir_searchable /usr/local/src >out.stdout  2>out.stderr
	check_exit_value $? 0		# should be zero
	check_nostdout			# should be no stdout
	check_nostderr			# should be no stderr
	tpresult				# set result code
}

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


cleanup() # clean-up function
{
     rm -f out.stdout out.stderr out.experr >/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
