Skip to content

Commit 344b4a3

Browse files
committed
fix
1 parent 38ceb02 commit 344b4a3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,12 @@ for shell in ${SHELLS[@]}; do
167167
assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1
168168
# Also check complex prompts, and unloading/purging the EESSI module
169169
prompt="\$(echo '\['✘) $ "
170-
updated_prompt="{EESSI/${EESSI_VERSION}} \[✘ $ "
170+
promptstr="\[✘ $ "
171+
updated_promptstr="{EESSI/${EESSI_VERSION}} \[✘ $ "
171172
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"
173+
TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell >/dev/null 2>&1 ; module purge; echo \"\$PS1\"")
174+
assert "$TEST_EESSI_PS1_UPDATE" "$updated_promptstr"
175+
assert "$TEST_EESSI_PS1_REVERT" "$promptstr"
175176
fi
176177

177178
# End Test Suite

0 commit comments

Comments
 (0)