File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,6 +165,13 @@ for shell in ${SHELLS[@]}; do
165165 TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE=$( $shell -c " unset PS1 ; PS1='$ ' ; export EESSI_MODULE_UPDATE_PS1=0 ; . init/lmod/$shell 2>/dev/null ; . init/lmod/$shell 2>/dev/null ; echo \"\$ PS1\" " )
166166 assert_raises ' echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE" | grep "$pattern"' 1
167167 assert_raises ' echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1
168+ # Also check complex prompts, and unloading/purging the EESSI module
169+ prompt=" \$ (echo '\['✘) $ "
170+ updated_prompt=" {EESSI/${EESSI_VERSION} } \[✘ $ "
171+ TEST_EESSI_PS1_UPDATE=$( $shell -c " unset PS1 ; PS1=\" $prompt \" ; . init/lmod/$shell >/dev/null 2>&1 ; echo \"\$ PS1\" " )
172+ TEST_EESSI_NO_PS1_UPDATE=$( $shell -c " unset PS1 ; PS1=\" $prompt \" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$ PS1\" " )
173+ assert " $TEST_EESSI_PS1_UPDATE " " $updated_prompt "
174+ assert " $TEST_EESSI_NO_PS1_UPDATE " " $prompt "
168175 fi
169176
170177 # End Test Suite
You can’t perform that action at this time.
0 commit comments