Files
modules/testsuite/modulefiles/remove/5.0
Xavier Delaruelle f2af9db133 Make remove-path alter ::env() on display/help/test/whatis modes
Like previously done for 'append-path', set the variable passed to
'remove-path' procedure in ::env() array to make accurate value
available for later use during the modulefile evaluation.

As a side effect as remove-path command is now evaluated on help, test,
display and whatis modes, invalid argument on this command will raise
error. Previously arguments were not parsed so no error raised.

Add 50-cmds/069-remove-env test to check this ::env() array change over
all evaluation mode. Adapt 50-cmds/350-allin to check this change
against 'whatis' mode.
2018-04-14 16:19:52 +02:00

30 lines
753 B
Plaintext

#%Module1.0
##############################################################################
# Modules Revision 3.0
# Providing a flexible user environment
#
# File: remove/%M%
# Revision: %I%
# First Edition: 2018/04/14
# Last Mod.: %U%, %G%
#
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
#
# Description: Testuite modulefile
# Command:
# Sub-Command: remove-path, setenv
#
# Invocation: load, unload, display, help, test
# Result: %R{
# }R%
# Comment: %C{
# Check the effect of 'remove-path' command on $env() array
# variable through the different modulefile evaluation mode
# }C%
#
##############################################################################
remove-path TS1 yes
setenv TS2 $env(TS1)