mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
@@ -5749,11 +5749,11 @@ proc resolveModuleVersionOrAlias {name} {
|
||||
return $ret
|
||||
}
|
||||
|
||||
proc charEscaped {str {charlist { \\\t\{\}|<>!;#^$&*"'`()}}} {
|
||||
proc charEscaped {str {charlist { \\\t\{\}|<>!;#^$&*?"'`()}}} {
|
||||
return [regsub -all "\(\[$charlist\]\)" $str {\\\1}]
|
||||
}
|
||||
|
||||
proc charUnescaped {str {charlist { \\\t\{\}|<>!;#^$&*"'`()}}} {
|
||||
proc charUnescaped {str {charlist { \\\t\{\}|<>!;#^$&*?"'`()}}} {
|
||||
return [regsub -all "\\\\\(\[$charlist\]\)" $str {\1}]
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ foreach shell $shell_list {
|
||||
# ensure tools used in complex shell alias definition are available
|
||||
if {[find_bin grep] ne "" && [find_bin tr] ne "" && [find_bin awk] ne ""} {
|
||||
foreach shell $shell_list {
|
||||
testall_cmd_re "$shell" "module load $testsuite_modpath/alias/3.0\; testsuite" "Release" ".*" 0
|
||||
testall_cmd_re "$shell" "module load $testsuite_modpath/alias/3.0\; testsuite; ts2" "Release\nhttp://an.example.web\\?¶m=one" ".*" 0
|
||||
}
|
||||
} elseif {$verbose > 0} {
|
||||
send_user "\tSkipping shell alias definition tests\n"
|
||||
|
||||
@@ -33,3 +33,5 @@ switch -- [module-info shelltype] {
|
||||
}
|
||||
}
|
||||
|
||||
# check '?' and '&' are correctly escaped
|
||||
set-alias ts2 {echo "http://an.example.web?¶m=one"}
|
||||
|
||||
@@ -219,7 +219,7 @@ proc shell_val {test_shell val {re_mode 0}} {
|
||||
if {$val ne "(.*)"} {
|
||||
switch -- $test_shell {
|
||||
{sh} - {bash} - {ksh} - {zsh} - {csh} - {tcsh} - {fish} {
|
||||
set val [regsub -all {([\\"'$|{}`* ()!&])} $val {\\\1}]
|
||||
set val [regsub -all {([\\"'$|{}`*? ()!&])} $val {\\\1}]
|
||||
}
|
||||
{lisp} - {cmake} {
|
||||
set val [regsub -all {(["])} $val {\\\1}]
|
||||
|
||||
@@ -76,16 +76,19 @@ set modulefile "$modpath/$module"
|
||||
|
||||
set ans [list]
|
||||
lappend ans [list alias testsuite {echo $(grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}')}]
|
||||
lappend ans [list alias ts2 {echo "http://an.example.web?¶m=one"}]
|
||||
lappend ans [list setpath LOADEDMODULES $module]
|
||||
lappend ans [list setpath _LMFILES_ $modulefile]
|
||||
|
||||
set ans2 [list]
|
||||
lappend ans2 [list alias testsuite {echo `grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}'`}]
|
||||
lappend ans2 [list alias ts2 {echo "http://an.example.web?¶m=one"}]
|
||||
lappend ans2 [list setpath LOADEDMODULES $module]
|
||||
lappend ans2 [list setpath _LMFILES_ $modulefile]
|
||||
|
||||
set ans3 [list]
|
||||
lappend ans3 [list alias testsuite {echo (grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}')}]
|
||||
lappend ans3 [list alias ts2 {echo "http://an.example.web?¶m=one"}]
|
||||
lappend ans3 [list setpath LOADEDMODULES $module]
|
||||
lappend ans3 [list setpath _LMFILES_ $modulefile]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user