##############################################################################
#   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:		load
#   Modulefiles:	info/userexp
#   Sub-Command:
#
#   Comment:	%C{
#			Tests the 'module-info user' module subcommand with
#			own suggestion.
#			This command does not change behaviour depending on
#			the user shell. Tests are made for the bourne shell
#			here.
#		}C%
#
##############################################################################

# ensure auto symbolic versions are not set for these tests
setenv_var MODULES_ADVANCED_VERSION_SPEC 0

#
#  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 "info/userexp"
set modulefile "$modpath/$module"

#
#  The _LMFILES_ and the LOADEDMODULES will be affected
#

lappend ans [list set _LMFILES__modshare "$modulefile:1"]
lappend ans [list set LOADEDMODULES_modshare "$module:1"]
lappend ans [list set _LMFILES_ $modulefile]
lappend ans [list set LOADEDMODULES $module]
lappend ans [list set testsuite unknown]

#
#  The tests
#

# different behavior than C-version: on Tcl-version userlvl is not handled and
# [module-info user "level"] will always return false.

test_cmd "sh" "load $module" $ans

#
#  Cleanup
#

reset_test_env
