Skip to content

Commit 47f2833

Browse files
committed
Also check that it doesn't update PS1 when it shouldn't
1 parent f3f5aef commit 47f2833

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ for shell in ${SHELLS[@]}; do
142142
if [ "$shell" = "bash" ] || [ "$shell" = "ksh" ] || [ "$shell" = "zsh" ]; then
143143
# Typically this is a non-interactive shell, so manually set PS1 when testing
144144
TEST_EESSI_PS1_UPDATE=$($shell -c "PS1='$ ' ; source init/lmod/$shell 2>/dev/null ; echo \"\$PS1\"")
145-
pattern="{EESSI/${EESSI_VERSION}}"
145+
TEST_EESSI_NO_PS1_UPDATE=$($shell -c "source init/lmod/$shell 2>/dev/null ; echo \"\$PS1\"")
146+
pattern="{EESSI/${EESSI_VERSION}} "
146147
assert_raises 'echo "$TEST_EESSI_PS1_UPDATE" | grep "$pattern"'
148+
assert_raises 'echo "$TEST_EESSI_NO_PS1_UPDATE" | grep "$pattern"' 1
147149
fi
148150

149151
# End Test Suite

0 commit comments

Comments
 (0)