##############################################################################
#   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/shells
#   Sub-Command:
#
#   Comment:	%C{
#			Tests the 'module-info shell' and the 'module-info
#			shelltype' module subcommands with own suggestion.
#		}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 "info/shells"
set modulefile "$modpath/$module"

#
#  The tests
#

foreach sh $supported_shells {
    switch -- $sh {
        {sh} - {bash} - {ksh} - {zsh} {
            set shtype "sh"
        }
        {csh} - {tcsh} {
            set shtype "csh"
        }
        default {
            set shtype $sh
        }
    }
    set ans [list]
    lappend ans [list set testsuite "$sh/$shtype"]
    lappend ans [list setpath LOADEDMODULES $module]
    lappend ans [list setpath _LMFILES_ $modulefile]

    test_cmd "$sh" "load $module" $ans
}

#
#  Cleanup
#

reset_test_env
