##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.70-maint/%M%
#   Revision:		%I%
#   First Edition:	1995/12/06
#   Last Mod.:		%U%, %G%
#
#   Authors:		Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
#   Description:	Testuite testsequence
#   Command:		purge
#   Modulefiles:	setenv/1.0
#   Sub-Command:
#
#   Comment:	%C{
#			Tests the module command 'purge'
#		}C%
#
##############################################################################

#
#  Variables. This test forces a module load command. It will result in the
#    environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to
#    be set up
#

set module "setenv/1.0"
set modulefile "$env(MODULEPATH)/$module"

#
#  Check this only fo the /bin/csh
#

set lm_csh "unsetenv LOADEDMODULES;"
set lmf_csh "unsetenv _LMFILES_;"
set ts_csh "unsetenv testsuite;"

#
#  Set up the environment pointing to the single module file being load
#

set env(_LMFILES_) $modulefile
set env(LOADEDMODULES) $module

#
#  The tests
#

test_cmd "csh" "purge" "$lm_csh$lmf_csh$ts_csh"

#
#  Cleanup
#

unset env(LOADEDMODULES)
unset env(_LMFILES_)

unset lm_csh
unset lmf_csh
unset ts_csh

unset modulefile
unset module
