############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.70-maint/%M% # Revision: %I% # First Edition: 2017/11/27 # Last Mod.: %U%, %G% # # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # # Description: Testuite testsequence # Command: is-saved # Modulefiles: # Sub-Command: # # Comment: %C{ # Test 'is-saved' module command # }C% # ############################################################################## # set HOME to location containing collections set homewithcoll "$env(HOME)/home" if {$verbose} { send_user "\tSetup HOME = $homewithcoll\n" } set env(HOME) "$homewithcoll" # # The tests # testouterr_cmd "ALL" "is-saved foo" "ERR" "" testouterr_cmd "ALL" "is-saved foo coll1" "OK" "" skip_if_quick_mode testouterr_cmd "sh" "is-saved" "OK" "" # test collection requiring an upcoming version of Modules # test effect of mcookie configuration with this collection testouterr_cmd sh "is-saved coll48" ERR {} testouterr_cmd sh "is-saved $homewithcoll/coll48" ERR {} setenv_var MODULES_MCOOKIE_CHECK eval testouterr_cmd sh "is-saved coll48" ERR {} setenv_var MODULES_MCOOKIE_CHECK always setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 testouterr_cmd sh "is-saved coll48" ERR {} setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 # define a collection target if {$verbose} { send_user "\tSetup MODULES_COLLECTION_TARGET = 'target'\n" } set env(MODULES_COLLECTION_TARGET) "target" testouterr_cmd "sh" "is-saved foo coll1" "ERR" "" testouterr_cmd "sh" "is-saved coll4" "OK" "" testouterr_cmd "sh" "is-saved" "OK" "" # define a collection target with no collection related to it if {$verbose} { send_user "\tSetup MODULES_COLLECTION_TARGET = 'foo'\n" } set env(MODULES_COLLECTION_TARGET) "foo" testouterr_cmd "sh" "is-saved" "ERR" "" # test unsetting HOME if {$verbose} { send_user "\tUnset HOME \n" } unset env(HOME) testouterr_cmd "sh" "is-saved" "ERR" "$error_msgs: HOME not defined" # # Cleanup # reset_test_env