#!/bin/sh
# include-tc.sh : test case for /usr/include 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/usr/include/include-tc.sh
#	AUTHOR:		Andrew Josey, The Open Group
#	DATE CREATED:	21 Dec 1998
##########################################################################

# This is $Revision: 1.4 $
#
# $Log: include-tc.sh,v $
# Revision 1.4  2002/05/25 06:21:52  ajosey
# testcase 4.6-2 is a duplicate of 4.4-4 so make NOTINUSE
#
# Revision 1.3  2001/08/14 14:38:11  ajosey
# update the assertion numbers for FHS2.2
#
# Revision 1.2  2001/07/18 09:12:49  ajosey
# update header, and remove tp3 as not in use in FHS2.2
#
# 
# -- old cvs history below --
#
# This is 1.3
#
# include-tc.sh,v
# Revision 1.3  2000/04/14 10:34:16  ajosey
# renumber the assertions for FHS2.1
#
# Revision 1.2  2000/04/09 07:15:35  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.6-1(A)"
	tet_infoline "The /usr/include directory exists and is searchable"
	lsb_test_dir_searchable /usr/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
}

tp2()
{
	tpstart "Reference 4.6-2(C)"
	tet_infoline "If the file /usr/include/X11 exists, it shall be a symbolic link and point to /usr/X11R6/include/X11"
	tet_infoline "Note: Duplicate assertion to 4.4-4(C)"
	tpresult NOTINUSE
#	lsb_test_symlink /usr/include/X11 /usr/X11R6/include/X11  >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
}

# withdrawn in FHS2.2
tp3()
{
	tpstart "Reference 4.6-3(A)"
	tet_infoline "The /usr/include/g++ directory exists and is searchable"
	tet_infoline "Note: not in use in FHS2.2"
	tpresult NOTINUSE				# set result code
#	lsb_test_dir_searchable /usr/include/g++ >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
