Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Feb 22, 2024
1 parent 5045a8a commit d4b75f6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/reftests/init-scripts.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,36 @@ No configuration file found, using built-in defaults.
[default] Initialised
### # we need the switch for variables file
### opam switch create fake --empty --root root
### find root/opam-init/*
### : Init scripts :
### cat root/opam-init/init.sh
if [ -t 0 ]; then
test -r '${BASEDIR}/root/opam-init/complete.sh' && . '${BASEDIR}/root/opam-init/complete.sh' > /dev/null 2> /dev/null || true
test -r ${BASEDIR}/root/opam-init/complete.sh && . ${BASEDIR}/root/opam-init/complete.sh > /dev/null 2> /dev/null || true

test -r '${BASEDIR}/root/opam-init/env_hook.sh' && . '${BASEDIR}/root/opam-init/env_hook.sh' > /dev/null 2> /dev/null || true
test -r ${BASEDIR}/root/opam-init/env_hook.sh && . ${BASEDIR}/root/opam-init/env_hook.sh > /dev/null 2> /dev/null || true
fi

test -r '${BASEDIR}/root/opam-init/variables.sh' && . '${BASEDIR}/root/opam-init/variables.sh' > /dev/null 2> /dev/null || true
test -r ${BASEDIR}/root/opam-init/variables.sh && . ${BASEDIR}/root/opam-init/variables.sh > /dev/null 2> /dev/null || true
### cat root/opam-init/init.zsh
if [[ -o interactive ]]; then
[[ ! -r '${BASEDIR}/root/opam-init/complete.zsh' ]] || source '${BASEDIR}/root/opam-init/complete.zsh' > /dev/null 2> /dev/null
[[ ! -r ${BASEDIR}/root/opam-init/complete.zsh ]] || source ${BASEDIR}/root/opam-init/complete.zsh > /dev/null 2> /dev/null

[[ ! -r '${BASEDIR}/root/opam-init/env_hook.zsh' ]] || source '${BASEDIR}/root/opam-init/env_hook.zsh' > /dev/null 2> /dev/null
[[ ! -r ${BASEDIR}/root/opam-init/env_hook.zsh ]] || source ${BASEDIR}/root/opam-init/env_hook.zsh > /dev/null 2> /dev/null
fi

[[ ! -r '${BASEDIR}/root/opam-init/variables.sh' ]] || source '${BASEDIR}/root/opam-init/variables.sh' > /dev/null 2> /dev/null
[[ ! -r ${BASEDIR}/root/opam-init/variables.sh ]] || source ${BASEDIR}/root/opam-init/variables.sh > /dev/null 2> /dev/null
### cat root/opam-init/init.fish
if isatty
source '${BASEDIR}/root/opam-init/env_hook.fish' > /dev/null 2> /dev/null; or true
source ${BASEDIR}/root/opam-init/env_hook.fish > /dev/null 2> /dev/null; or true
end

source '${BASEDIR}/root/opam-init/variables.fish' > /dev/null 2> /dev/null; or true
source ${BASEDIR}/root/opam-init/variables.fish > /dev/null 2> /dev/null; or true
### cat root/opam-init/init.csh
if ( $?prompt ) then
if ( -f '${BASEDIR}/root/opam-init/env_hook.csh' ) source '${BASEDIR}/root/opam-init/env_hook.csh' >& /dev/null
if ( -f ${BASEDIR}/root/opam-init/env_hook.csh ) source ${BASEDIR}/root/opam-init/env_hook.csh >& /dev/null
endif

if ( -f '${BASEDIR}/root/opam-init/variables.csh' ) source '${BASEDIR}/root/opam-init/variables.csh' >& /dev/null
if ( -f ${BASEDIR}/root/opam-init/variables.csh ) source ${BASEDIR}/root/opam-init/variables.csh >& /dev/null
### : Variables scripts :
### cat root/opam-init/variables.sh
# Prefix of the current opam switch
Expand All @@ -44,8 +45,7 @@ OPAM_SWITCH_PREFIX='${BASEDIR}/root/fake'; export OPAM_SWITCH_PREFIX;
MANPATH="$MANPATH":'${BASEDIR}/root/fake/man'; export MANPATH;
# Binary dir for opam switch fake
PATH='${BASEDIR}/root/fake/bin':"$PATH"; export PATH;
### cat root/opam-init/variables.zsh
cat: root/opam-init/variables.zsh: No such file or directory
### test -f root/opam-init/variables.zsh
# Return code 1 #
### cat root/opam-init/variables.fish
# Prefix of the current opam switch
Expand Down

0 comments on commit d4b75f6

Please sign in to comment.