##############################################################################
#   Modules Revision 3.2
#   Providing a flexible user environment
#
#   First Edition:	2017/04/16
#
#   Authors:		Xavier Delaruelle, xavier.delaruelle@cea.fr
#
#   Description:	Deep modulefile directories - whatis
#
##############################################################################

set header "$modlin $modpathre $modlin"


testouterr_cmd_re "csh" "whatis $ialias1" "OK" "$header\n   $oalias1: $oalias1"
testouterr_cmd_re "csh" "whatis $ialias2" "OK" "$header\n   $oalias2: $oalias2"
testouterr_cmd_re "csh" "whatis $ialias3" "OK" "$header\n        $oalias3: $oalias3"

testouterr_cmd_re "csh" "whatis $isym1" "OK" "$header\n     $osym1: $osym1"
testouterr_cmd_re "csh" "whatis $isym2" "OK" "$header\n     $osym2: $osym2"

testouterr_cmd_re "csh" "whatis $ivirt1" "OK" "$header\n    $ovirt1: $ovirt1"
testouterr_cmd_re "csh" "whatis $ivirt2" "OK" "$header\n    $ovirt2: $ovirt2"
testouterr_cmd_re "csh" "whatis $ivirt3" "OK" "$header\n         $ovirt3: $ovirt3"
testouterr_cmd_re "csh" "whatis $ivirt4" "OK" "$header\n\\s*$ivirt4/1.0: $ivirt4/1.0\n\\s*$ovirt4: $ovirt4"
testouterr_cmd_re "csh" "whatis $ivirt5" "OK" "$header\n\\s*$ovirt5: $ovirt5\\s*$ovirt4: $ovirt4"
testouterr_cmd_re "csh" "whatis $ivirt6" "OK" "$header\n\\s*$ovirt6: $ovirt6"
testouterr_cmd_re "csh" "whatis $ivirt7" "OK" "$header\n\\s*$ovirt5: $ovirt5\\s*$ovirt6: $ovirt6\\s*$ovirt7: $ovirt7"
testouterr_cmd_re "csh" "whatis $ivirt8" "OK" "$header\n\\s*$ovirt5: $ovirt5\\s*$ovirt6: $ovirt6\\s*$ovirt8: $ovirt8"

testouterr_cmd_re "csh" "whatis $idalias0" "OK" "$header\n    $odalias0: $odalias0"
testouterr_cmd_re "csh" "whatis $idalias1" "OK" "$header\n    $odalias1: $odalias1"

testouterr_cmd_re "csh" "whatis $ibadvers0" "OK" "$header\n $obadvers1: $obadvers1\n      $obadvers0: $obadvers0"
testouterr_cmd_re "csh" "whatis $ibadvers1" "OK" "$header\n $obadvers1: $obadvers1"

testouterr_cmd_re "csh" "whatis modulerc/foo" "OK" "$header\n\\s*modulerc/dir2/1.0/rc1: modulerc/dir2/1.0/rc1\n\\s*modulerc/dir2/1.0/rc2: modulerc/dir2/1.0/rc2\n\\s*modulerc/dir2/2.0: modulerc/dir2/2.0\n\\s*modulerc/dir2/3.0: modulerc/dir2/3.0"

reset_test_env
