##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.00-init/%M%
#   Revision:		%I%
#   First Edition:	95/12/06
#   Last Mod.:		%U%, %G%
#
#   Authors:		Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
#   Description:	Testuite testsequence
#   Command:
#   Sub-Command:
#
#   Comment:	%C{
#			Check the version of modulecmd
#		}C%
#
##############################################################################

#
# The following reflects the version and patchlevel expected to be returned
# from modulecmd
# This command will only be run for the bourne shell
#

if [info exists env(MODULEVERSION)] {
   set exp_vers $env(MODULEVERSION)    
} else {
   send_user "FATAL: MODULEVERSION env var needs to be set\n"
   exit
}
set shell "sh"

#
# Check the version at first
#

set tmp [modulecmd_version]
if { $tmp != $exp_vers } then { 		fail "version $tmp"
} else { 					pass "version $tmp"
}

testerr_cmd_re "csh" "--version" "VERSION=$exp_vers.*"
test_cmd_re "--version" "" "VERSION=$exp_vers.*"
