Commit Graph

9 Commits

Author SHA1 Message Date
Xavier Delaruelle
145462a864 ts/doc: add stashpop test/doc on 'module-info command' 2022-09-28 07:20:54 +02:00
Xavier Delaruelle
ec835353b2 ts/doc: add stash test/doc on 'module-info command' 2022-09-28 06:42:59 +02:00
Xavier Delaruelle
d391d31d57 ts/doc: add reset test/doc on 'module-info command' 2022-08-25 08:10:01 +02:00
Xavier Delaruelle
6f9928f3bf ts/doc: add mod-to-sh test/doc on 'module-info command' 2022-07-30 16:07:28 +02:00
Xavier Delaruelle
a18618ff94 ts/doc: add load-any test/doc on 'module-info command' 2021-12-24 16:04:16 +01:00
Xavier Delaruelle
7a516a8ad9 ts: add tests for 'refresh' subcmd 2021-08-14 19:36:22 +02:00
Xavier Delaruelle
237755f9fb ts/doc: add try-load test/doc on 'module-info command' 2021-08-13 07:53:54 +02:00
Xavier Delaruelle
20093d7218 Introduce 'test' command and mode
Add 'module test' command to trigger when called execution of a
ModulesTest procedure in target modulefile following same kind of
mechanism than 'module help'.

If ModulesTest procedure is missing from modulefile, a 'Unable to find
ModulesTest proc' message is displayed but no error code is set. If
ModulesTest procedure returns 1 (true), test is considered successful and
message 'Test result: PASS' is displayed. If ModulesTest returns no or
any other value, test is considered failed and message 'Test result:
FAIL' is displayed. In this case, module command exit in error.

Adapt bash and tcsh completion scripts for the new command. Describe new
command and new mode in docs.

Adapt existing non-regression tests and relative test modulefiles for
new command and new mode in 00-init, 50-cmds and 70-maint suites. Add
085-test tests in 70-maint to check coherent behavior of new command.
2017-04-30 19:00:18 +02:00
Xavier Delaruelle
df5b995726 Introduce 'module-info command'
Introduce g_commandNameStack variable, currentCommandName,
pushCommandName and popCommandName procedures to implement a
'module-info command' that returns the name of the currently running
module command.

This new mechanism enables to distinguish complex 'load' or 'unload'
commands that cannot be determined with 'module-info mode' alone. For
instance a modulefile can now be aware that a 'switch', a 'restore' or
a 'purge' command is currently being run.

Add description of this new command to the modulefile documentation.

Add 282-info-command and 283-info-command-exp tests in 50-cmds and adapt
281-info-modulerc in 50-cmds and 020-savelist in 61-coll.
2017-02-02 06:40:56 +01:00