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

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

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


tp1()
{
	tpstart "Reference 4.7-1(A)"
	tet_infoline "The /usr/lib directory exists and is searchable"
	lsb_test_dir_searchable /usr/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
}

tp2()
{
	tpstart "Reference 4.7-2(A)"
	tet_infoline "The symbolic link /usr/lib/sendmail exists and points to /usr/sbin/sendmail"
	tet_infoline "Note that this is a mandatory LSB requirement over the FHS (LSB Section 14.1)"
	lsb_test_symlink /usr/lib/sendmail /usr/sbin/sendmail  >out.stderr 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.7-3(A)"
	tet_infoline "The symbolic link /usr/lib/X11 exists and points to /usr/X11R6/lib/X11"
	tet_infoline "Reason for omission: duplicate of 4.1-4(A)"
	tpresult NOTINUSE		# 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
