"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testsuite/modules.70-maint/310-sh-to-mod.exp" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

310-sh-to-mod.exp  (modules-5.1.1.tar.bz2):310-sh-to-mod.exp  (modules-5.2.0.tar.bz2)
skipping to change at line 78 skipping to change at line 78
# clean environment from variables used in tests # clean environment from variables used in tests
foreach var [array names -glob FOO*] { foreach var [array names -glob FOO*] {
unsetenv_var $var unsetenv_var $var
} }
# expected script env changes # expected script env changes
set tsvarpre "prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 set tsvarpre "prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3
prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\\{r2 /path/to/dir3 prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\\{r2 /path/to/dir3
prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3
prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d*r2 /path/to/dir3" prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d*r2 /path/to/dir3"
set tsvarappwpath {}
set tsvarprewpath $tsvarpre
set tsvarsetwpath {}
if {$install_setmanpath eq {y}} {
set default_manpath {}
if {$install_usemanpath eq {y}} {
# update PATH if set by autoinit, as it can influence the directory list
# returned by manpath command
if {$install_setbinpath eq {y}} {
setenv_var PATH $install_bindir:$::env(PATH)
}
catch {set default_manpath [exec -ignorestderr 2>/dev/null manpath]}
if {$install_setbinpath eq {y}} {
setenv_var PATH $ORIG_PATH
}
} elseif {[info exists ::env(MANPATH)]} {
set default_manpath $::env(MANPATH)
}
if {$install_mandir ni [split $default_manpath :]} {
if {[string first { } $install_mandir] != -1} {
set mandirenc "{$install_mandir}"
} else {
set mandirenc $install_mandir
}
if {$install_appendmanpath eq {y}} {
if {![info exists ::env(MANPATH)]} {
# even if appended, sh-to-mod summarizes this as a prepend-path
append tsvarprewpath "\nprepend-path\tMANPATH {} $mandirenc"
} elseif {$::env(MANPATH) eq {}} {
append tsvarsetwpath "setenv\t\tMANPATH $mandirenc\n"
} elseif {$::env(MANPATH) eq {:}} {
append tsvarsetwpath "setenv\t\tMANPATH :$mandirenc\n"
} else {
append tsvarappwpath "append-path\tMANPATH $mandirenc\n"
}
} else {
if {![info exists ::env(MANPATH)]} {
append tsvarprewpath "\nprepend-path\tMANPATH $mandirenc {}"
} elseif {$::env(MANPATH) eq {}} {
append tsvarsetwpath "setenv\t\tMANPATH $mandirenc\n"
} elseif {$::env(MANPATH) eq {:}} {
append tsvarsetwpath "setenv\t\tMANPATH $mandirenc:\n"
} else {
append tsvarprewpath "\nprepend-path\tMANPATH $mandirenc"
}
}
}
}
# no binpath add even if enabled in case it is already part of PATH
if {$install_setbinpath eq {y} && $install_bindir ni [split $::env(PATH) :]} {
if {[string first { } $install_bindir] != -1} {
set bindirenc "{$install_bindir}"
} else {
set bindirenc $install_bindir
}
if {$install_appendbinpath eq {y}} {
append tsvarappwpath "append-path\tPATH $bindirenc\n"
} else {
append tsvarprewpath "\nprepend-path\tPATH $bindirenc"
}
}
set tsvar "setenv\t\tFOO value set tsvar "setenv\t\tFOO value
setenv\t\tFOOCB va\\{ue setenv\t\tFOOCB va\\{ue
setenv\t\tFOOEM {} setenv\t\tFOOEM {}
setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3}
setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 }
setenv\t\tFOOSP {value } setenv\t\tFOOSP {value }
setenv\t\tFOOWC va*ue" setenv\t\tFOOWC va*ue"
set tsfunc_bash "set-function\tfunccb \\n\\ \\ \\ \\ echo\\ f\\{o set tsfunc_bash "set-function\tfunccb \\n\\ \\ \\ \\ echo\\ f\\{o
set-function\tfuncfoo { set-function\tfuncfoo {
echo foo} echo foo}
skipping to change at line 739 skipping to change at line 800
setenv_var TCLSH $TCLSH setenv_var TCLSH $TCLSH
# if module was defined in environment prior test, the result of the source-sh e valuation # if module was defined in environment prior test, the result of the source-sh e valuation
# will be the unset of the module functions # will be the unset of the module functions
if {$is_modules_defined} { if {$is_modules_defined} {
set extratserr "\nunset-function\t_module_raw\nunset-function\tml\nunset-fun ction\tmodule" set extratserr "\nunset-function\t_module_raw\nunset-function\tml\nunset-fun ction\tmodule"
} else { } else {
set extratserr {} set extratserr {}
} }
set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" set tserr "#%Module\n$tsvarappwpath$tscwd\n$tsvarprewpath\n$tsvar\n"
if {$install_versioning eq {y}} { if {$install_versioning eq {y}} {
append tserr "setenv\t\tMODULE_VERSION $install_version append tserr "setenv\t\tMODULE_VERSION $install_version
setenv\t\tMODULE_VERSION_STACK $install_version\n" setenv\t\tMODULE_VERSION_STACK $install_version\n"
} }
append tserr $tsvarsetwpath
append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar
setenv\t\ttestsuite yes" setenv\t\ttestsuite yes"
set tserrbash "$tserr$extratserr" set tserrbash "$tserr$extratserr"
foreach sh $shtomod_avail_shells { foreach sh $shtomod_avail_shells {
# unset module definition on bash when module is predefined # unset module definition on bash when module is predefined
if {$sh eq {bash} || ($sh eq {sh} && $sh_kind eq {bash})} { if {$sh eq {bash} || ($sh eq {sh} && $sh_kind eq {bash})} {
testouterr_shtomod $sh {} OK $tserrbash testouterr_shtomod $sh {} OK $tserrbash
# skip this test for old fish version as a __fish_restore_status # skip this test for old fish version as a __fish_restore_status
# function is defined in this case # function is defined in this case
} elseif {$sh ne {fish} || $fish_version_ge31} { } elseif {$sh ne {fish} || $fish_version_ge31} {
testouterr_shtomod $sh {} OK $tserr testouterr_shtomod $sh {} OK $tserr
} }
} }
# already set variable with equal or different value # already set variable with equal or different value
setenv_var MODULES_COLLECTION_TARGET foo setenv_var MODULES_COLLECTION_TARGET foo
setenv_var testsuite yes setenv_var testsuite yes
set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" set tserr "#%Module\n$tsvarappwpath$tscwd\n$tsvarprewpath\n$tsvar\n"
if {$install_versioning eq {y}} { if {$install_versioning eq {y}} {
append tserr "setenv\t\tMODULE_VERSION $install_version append tserr "setenv\t\tMODULE_VERSION $install_version
setenv\t\tMODULE_VERSION_STACK $install_version\n" setenv\t\tMODULE_VERSION_STACK $install_version\n"
} }
append tserr $tsvarsetwpath
append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr" append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr"
testouterr_shtomod bash {} OK $tserr testouterr_shtomod bash {} OK $tserr
# module is loaded prior sh-to-mod # module is loaded prior sh-to-mod
setenv_var testsuite no setenv_var testsuite no
setenv_loaded_module [list setenv/1.0] [list $modpath/setenv/1.0] setenv_loaded_module [list setenv/1.0] [list $modpath/setenv/1.0]
set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" set tserr "#%Module\n$tsvarappwpath$tscwd\n$tsvarprewpath\n$tsvar\n"
if {$install_versioning eq {y}} { if {$install_versioning eq {y}} {
append tserr "setenv\t\tMODULE_VERSION $install_version append tserr "setenv\t\tMODULE_VERSION $install_version
setenv\t\tMODULE_VERSION_STACK $install_version\n" setenv\t\tMODULE_VERSION_STACK $install_version\n"
} }
append tserr $tsvarsetwpath
append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr" append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr"
testouterr_shtomod bash {} OK $tserr testouterr_shtomod bash {} OK $tserr
# #
# Cleanup # Cleanup
# #
reset_test_env reset_test_env
 End of changes. 7 change blocks. 
3 lines changed or deleted 67 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)