Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonSohoel committed Nov 12, 2024
1 parent 5670da9 commit 7aa0d96
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tests/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,20 @@ def test_write_activator_switches(tmpdir):
actual_csh_activator.read_text(encoding="utf-8").strip()
== f"""
if ( `uname -r` =~ *el7* ) then
setenv KOMODO_ROOT {prefix}
set KOMODO_RELEASE_REAL = "{expected_release}"
source $KOMODO_ROOT/$KOMODO_RELEASE_REAL-rhel7/enable.csh
if ( $?_KOMODO_OLD_PROMPT ) then
set prompt = "[$KOMODO_RELEASE_REAL] $_KOMODO_OLD_PROMPT"
# Get the last command executed wich contains the full path of the sourced script
set lastCommandExecuted = ($_)
if ( "$lastCommandExecuted" =~ "*deprecated-rhel7*" ) then
setenv KOMODO_ROOT {prefix}
set KOMODO_RELEASE_REAL = "{expected_release}"
source $KOMODO_ROOT/$KOMODO_RELEASE_REAL-rhel7/enable.csh
if ( $?_KOMODO_OLD_PROMPT ) then
set prompt = "[$KOMODO_RELEASE_REAL] $_KOMODO_OLD_PROMPT"
endif
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
else
echo "{MIGRATION_WARNING}"
endif
setenv KOMODO_RELEASE $KOMODO_RELEASE_REAL
else if ( `uname -r` =~ *el8* ) then
setenv KOMODO_ROOT {prefix}
set KOMODO_RELEASE_REAL = "{expected_release}"
Expand Down

0 comments on commit 7aa0d96

Please sign in to comment.