===========================
step 1
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version
===========================
===========================
step 2
lua ProjectDIR/src/lmod.in.lua R --regression_testing load a
===========================
Sys.setenv("A_VERSION"="1.0");
Sys.setenv("LOADEDMODULES"="a/1.0");
Sys.setenv("__LMOD_REF_COUNT_MODULEPATH"="ProjectDIR/rt/r_shell/mf/Core:1");
Sys.setenv("MODULEPATH"="ProjectDIR/rt/r_shell/mf/Core");
Sys.setenv("_LMFILES_"="ProjectDIR/rt/r_shell/mf/Core/a/1.0");
mlstatus <- TRUE
===========================
step 3
lua ProjectDIR/src/lmod.in.lua R --regression_testing load b
===========================
Sys.setenv("B_VERSION"="1.0");
Sys.setenv("LOADEDMODULES"="b/1.0");
Sys.setenv("__LMOD_REF_COUNT_MODULEPATH"="ProjectDIR/rt/r_shell/mf/Core:1");
Sys.setenv("MODULEPATH"="ProjectDIR/rt/r_shell/mf/Core");
Sys.setenv("_LMFILES_"="ProjectDIR/rt/r_shell/mf/Core/b/1.0.lua");
mlstatus <- TRUE
===========================
step 4
lua ProjectDIR/src/lmod.in.lua R --regression_testing load bad
===========================
Sys.setenv("__LMOD_LAST_ERROR"="Lmod has detected the following error: Unable to load module because of error when evaluating modulefile:\
     ProjectDIR/rt/r_shell/mf/Core/bad/1.0.lua: [string \"WTF(\"foo\")...\"]:1:
     Please check the modulefile and especially if there is a line number specified in the above message \
While processing the following module(s):\
    Module fullname  Module Filename\
\
    bad/1.0          ProjectDIR/rt/r_shell/mf/Core/bad/1.0.lua\
");
mlstatus <- TRUE
mlstatus <- FALSE
