#%Module1.0

##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		inforc/%M%
#   Revision:		%I%
#   First Edition:	2017/01/22
#   Last Mod.:		%U%, %G%
#
#   Authors:		Xavier Delaruelle, xavier.delaruelle@cea.fr
#
#   Description:	Testuite modulefile
#   Command:
#   Sub-Command:
#
#   Invocation:
#   Result:	%R{
#		}R%
#   Comment:	%C{
#			Test 'module-info' commands when called from a .modulerc file
#		}C%
#
##############################################################################

module-alias inforc/foo /1.0

if { [module-info command avail] || [module-info command aliases]\
    || [module-info command list] } {
    module-version /2.0 bar default [module-info command]
} else {
    module-version /2.0 bar default
}

set mode [module-info mode]
if { $mode ne "" && $mode ne "whatis" } {
    puts stderr "mode: $mode"
    puts stderr "command: [module-info command]"
    puts stderr "type: [module-info type]"
    puts stderr "name: [module-info name]"
    puts stderr "specified: [module-info specified]"
    puts stderr "shell: [module-info shell]"
    puts stderr "shelltype: [module-info shelltype]"
    puts stderr "alias inforc/foo: [module-info alias inforc/foo]"
    puts stderr "version inforc/bar: [module-info version inforc/bar]"
    puts stderr "symbols inforc/2.0: [module-info symbols inforc/2.0]"
}
