===========================
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
Modules based on Lua: Version 8.6.16  2022-03-22 14:19 -05:00
    by Robert McLay mclay@tacc.utexas.edu
===========================
step 2
buildSh2MF ProjectDIR/rt/sh_to_modulefile/tstScript.sh
===========================
===========================
step 3
buildSh2MF --to TCL ProjectDIR/rt/sh_to_modulefile/tstScript.sh
===========================
===========================
step 4
buildSh2MF ProjectDIR/rt/sh_to_modulefile/path_both_ends.sh
===========================
===========================
step 5
buildSh2MF --from csh ProjectDIR/rt/sh_to_modulefile/cshScript.csh
===========================
===========================
step 6
buildSh2MF ProjectDIR/rt/sh_to_modulefile/broken.sh
===========================
Error in script "ProjectDIR/rt/sh_to_modulefile/broken.sh":
ProjectDIR/rt/sh_to_modulefile/broken.sh: line 3: fooBar: command not found
===========================
step 7
lua ProjectDIR/src/lmod.in.lua bash --regression_testing show wrapperSh/1.0
===========================
   ProjectDIR/rt/sh_to_modulefile/mf/wrapperSh/1.0.lua:
 source_sh("bash","ProjectDIR/rt/sh_to_modulefile/tstScript.sh")
setenv("MY_NAME","tstScript.sh")
prepend_path("PATH","ProjectDIR/rt/sh_to_modulefile/bin")
append_path("PATH","ProjectDIR/rt/sh_to_modulefile/sbin")
setenv("TST_SCRIPT","1")
set_alias("fooAlias","foobin -q -l")
set_shell_function("banner"," \
    local str=\"$1\";\
    local RED='\\033[1;31m';\
    local NONE='\\033[0m';\
    echo \"${RED}${str}${NONE}\"\
","")
set_shell_function("fooFunc"," \
    echo \"arg1: $1\"\
","")
set_shell_function("junk"," \
    if [ -n \"${ZSH_VERSION:-}\" ]; then\
        \\echo \"junk\";\
    fi\
","")
set_shell_function("my_help"," \
    echo \"do not forget \\\"foo\\\"\"\
","")
set_shell_function("save_args"," \
    for arg in \"$@\";\
    do\
        printf \"%s\\n\" \"$arg\" | sed -e \"s/'/'\\\\\\\\''/g\" -e \"1s/^/'/\" -e \"\\$s/\\$/' \\\\\\\\/\";\
    done;\
    echo \" \"\
","")
complete("bash","xyz123","-F _xyz123")
setenv("MY_NAME","unknown")
 source_sh("bash","ProjectDIR/rt/sh_to_modulefile/second.sh arg1")
setenv("SECOND","FOO_BAR")
===========================
step 8
lua ProjectDIR/src/lmod.in.lua bash --regression_testing load wrapperSh/1.0
===========================
===========================
step 9
lua ProjectDIR/src/lmod.in.lua bash --regression_testing show wrapperSh/1.0
===========================
   ProjectDIR/rt/sh_to_modulefile/mf/wrapperSh/1.0.lua:
 source_sh("bash","ProjectDIR/rt/sh_to_modulefile/tstScript.sh")
setenv("MY_NAME","tstScript.sh")
prepend_path("PATH","ProjectDIR/rt/sh_to_modulefile/bin")
append_path("PATH","ProjectDIR/rt/sh_to_modulefile/sbin")
setenv("TST_SCRIPT","1")
set_alias("fooAlias","foobin -q -l")
set_shell_function("banner"," \
    local str=\"$1\";\
    local RED='\\033[1;31m';\
    local NONE='\\033[0m';\
    echo \"${RED}${str}${NONE}\"\
","")
set_shell_function("fooFunc"," \
    echo \"arg1: $1\"\
","")
set_shell_function("junk"," \
    if [ -n \"${ZSH_VERSION:-}\" ]; then\
        \\echo \"junk\";\
    fi\
","")
set_shell_function("my_help"," \
    echo \"do not forget \\\"foo\\\"\"\
","")
set_shell_function("save_args"," \
    for arg in \"$@\";\
    do\
        printf \"%s\\n\" \"$arg\" | sed -e \"s/'/'\\\\\\\\''/g\" -e \"1s/^/'/\" -e \"\\$s/\\$/' \\\\\\\\/\";\
    done;\
    echo \" \"\
","")
complete("bash","xyz123","-F _xyz123")
setenv("MY_NAME","tstScript.sh")
 source_sh("bash","ProjectDIR/rt/sh_to_modulefile/second.sh arg1")
setenv("SECOND","FOO_BAR")
===========================
step 10
lua ProjectDIR/src/lmod.in.lua bash --regression_testing refresh
===========================
===========================
step 11
lua ProjectDIR/src/lmod.in.lua bash --regression_testing list
===========================
Currently Loaded Modules:
  1) wrapperSh/1.0
===========================
step 12
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --mt
===========================
_ModuleTable_ = {
  MTversion = 3,
  c_rebuildTime = false,
  c_shortTime = false,
  depthT = {},
  family = {},
  mT = {
    wrapperSh = {
      fn = "ProjectDIR/rt/sh_to_modulefile/mf/wrapperSh/1.0.lua",
      fullName = "wrapperSh/1.0",
      loadOrder = 1,
      mcmdT = {
        ["ProjectDIR/rt/sh_to_modulefile/second.sh arg1"] = {
          "setenv(\"SECOND\",\"FOO_BAR\")",
        },
        ["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
          "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
    local str=\\"$1\\";\\
    local RED='\\033[1;31m';\\
    local NONE='\\033[0m';\\
    echo \\"${RED}${str}${NONE}\\"\\
","")]], [[set_shell_function("fooFunc"," \\
    echo \\"arg1: $1\\"\\
","")]], [[set_shell_function("junk"," \\
    if [ -n \\"${ZSH_VERSION:-}\\" ]; then\\
        \\\\echo \\"junk\\";\\
    fi\\
","")]], [[set_shell_function("my_help"," \\
    echo \\"do not forget \\\\\\"foo\\\\\\"\\"\\
","")]], [[set_shell_function("save_args"," \\
    for arg in \\"$@\\";\\
    do\\
        printf \\"%s\\\\n\\" \\"$arg\\" | sed -e \\"s/'/'\\\\\\\\\\\\\\\\''/g\\" -e \\"1s/^/'/\\" -e \\"\\\\$s/\\\\$/' \\\\\\\\\\\\\\\\/\\";\\
    done;\\
    echo \\" \\"\\
","")]], "complete(\"bash\",\"XyZ123\",\"-F _xyz123\")",
        },
      },
      propT = {},
      stackDepth = 0,
      status = "active",
      userName = "wrapperSh/1.0",
      wV = "000000001.*zfinal",
    },
  },
  mpathA = {
    "ProjectDIR/rt/sh_to_modulefile/mf",
  },
  systemBaseMPATH = "ProjectDIR/rt/sh_to_modulefile/mf",
}
===========================
step 13
lua ProjectDIR/src/lmod.in.lua bash --regression_testing unload wrapperSh/1.0
===========================
===========================
step 14
lua ProjectDIR/src/lmod.in.lua bash --regression_testing load brokenSh/1.0
===========================
Lmod has detected the following error: Error in script "ProjectDIR/rt/sh_to_modulefile/broken.sh":
ProjectDIR/rt/sh_to_modulefile/broken.sh: line 3: fooBar: command not found
While processing the following module(s):
    Module fullname  Module Filename
    brokenSh/1.0     ProjectDIR/rt/sh_to_modulefile/mf/brokenSh/1.0.lua
===========================
step 15
lua ProjectDIR/src/lmod.in.lua bash --regression_testing load wrapperSh/1.0
===========================
===========================
step 16
lua ProjectDIR/src/lmod.in.lua bash --regression_testing save
===========================
Saved current collection of modules to: "default"
===========================
step 17
lua ProjectDIR/src/lmod.in.lua bash --regression_testing restore
===========================
Restoring modules from user's default
===========================
step 18
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --mt
===========================
_ModuleTable_ = {
  MTversion = 3,
  c_rebuildTime = false,
  c_shortTime = false,
  depthT = {},
  family = {},
  mT = {
    wrapperSh = {
      fn = "ProjectDIR/rt/sh_to_modulefile/mf/wrapperSh/1.0.lua",
      fullName = "wrapperSh/1.0",
      loadOrder = 1,
      mcmdT = {
        ["ProjectDIR/rt/sh_to_modulefile/second.sh arg1"] = {
          "setenv(\"SECOND\",\"FOO_BAR\")",
        },
        ["ProjectDIR/rt/sh_to_modulefile/tstScript.sh"] = {
          "setenv(\"MY_NAME\",\"tstScript.sh\")", "prepend_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/bin\")", "append_path(\"PATH\",\"ProjectDIR/rt/sh_to_modulefile/sbin\")", "setenv(\"TST_SCRIPT\",\"1\")", "set_alias(\"fooAlias\",\"foobin -q -l\")", [[set_shell_function("banner"," \\
    local str=\\"$1\\";\\
    local RED='\\033[1;31m';\\
    local NONE='\\033[0m';\\
    echo \\"${RED}${str}${NONE}\\"\\
","")]], [[set_shell_function("fooFunc"," \\
    echo \\"arg1: $1\\"\\
","")]], [[set_shell_function("junk"," \\
    if [ -n \\"${ZSH_VERSION:-}\\" ]; then\\
        \\\\echo \\"junk\\";\\
    fi\\
","")]], [[set_shell_function("my_help"," \\
    echo \\"do not forget \\\\\\"foo\\\\\\"\\"\\
","")]], [[set_shell_function("save_args"," \\
    for arg in \\"$@\\";\\
    do\\
        printf \\"%s\\\\n\\" \\"$arg\\" | sed -e \\"s/'/'\\\\\\\\\\\\\\\\''/g\\" -e \\"1s/^/'/\\" -e \\"\\\\$s/\\\\$/' \\\\\\\\\\\\\\\\/\\";\\
    done;\\
    echo \\" \\"\\
","")]], "complete(\"bash\",\"XyZ123\",\"-F _xyz123\")",
        },
      },
      propT = {},
      stackDepth = 0,
      status = "active",
      userName = "wrapperSh/1.0",
      wV = "000000001.*zfinal",
    },
  },
  mpathA = {
    "ProjectDIR/rt/sh_to_modulefile/mf",
  },
  systemBaseMPATH = "ProjectDIR/rt/sh_to_modulefile/mf",
}
===========================
step 19
lua ProjectDIR/src/lmod.in.lua bash --regression_testing load A
===========================
===========================
step 20
lua ProjectDIR/src/lmod.in.lua bash --regression_testing list
===========================
Currently Loaded Modules:
  1) A/1.0
