##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.50-cmds/%M%
#   Revision:		%I%
#   First Edition:	1995/12/06
#   Last Mod.:		%U%, %G%
#
#   Authors:		Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
#   Description:	Testuite testsequence
#   Command:		unload
#   Modulefiles:	setenv/1.0
#   Sub-Command:
#
#   Comment:	%C{
#			Tests the reverse 'setenv' module subcommand for all
#			allowed shell types.
#		}C%
#
##############################################################################

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

set module "setenv/1.0"
set modulefile "$modpath/$module"

#
#  Set up the environment for reversal ...
#

set env(testsuite) "'yes'"
setenv_loaded_module $module $modulefile

#
#  For the different shells ...
#

lappend ans [list unset testsuite]
lappend ans [list unsetpath LOADEDMODULES]
lappend ans [list unsetpath _LMFILES_]

#
#  The tests
#

test_cmd "ALL" "unload $module" $ans

#
#  Cleanup
#

unset ans

unset modulefile
unset module

#
#  Clean up the environment, too
#

reset_test_env
