diff --git a/tests/reftests/env.test b/tests/reftests/env.test index 1be63e186ee..0683e002409 100644 --- a/tests/reftests/env.test +++ b/tests/reftests/env.test @@ -15,7 +15,7 @@ Done. ### opam env | grep "NV_VARS" | ';' -> ':' NV_VARS='${BASEDIR}/OPAM/setenv/doc/nv:${BASEDIR}/OPAM/setenv/share/nv': export NV_VARS: ### opam exec -- opam env --revert | grep "NV_VARS" | ';' -> ':' -NV_VARS='': export NV_VARS: +unset NV_VARS: ### NV_VARS=/another/path ### opam env | grep "NV_VARS" | ';' -> ':' NV_VARS='${BASEDIR}/OPAM/setenv/doc/nv:${BASEDIR}/OPAM/setenv/share/nv:/another/path': export NV_VARS: @@ -43,9 +43,9 @@ NV_VARS='hej!!'; export NV_VARS; ### opam exec -- opam env | grep "^NV_VARS|^OPAM_SWITCH_PREFIX|${OPAM}" OPAM_SWITCH_PREFIX='${BASEDIR}/OPAM/conffile'; export OPAM_SWITCH_PREFIX; NV_VARS='hej!!'; export NV_VARS; -### opam exec -- opam env --revert | grep "^NV_VARS|^OPAM_SWITCH_PREFIX|${OPAM}" -OPAM_SWITCH_PREFIX=''; export OPAM_SWITCH_PREFIX; -NV_VARS=''; export NV_VARS; +### opam exec -- opam env --revert | grep "NV_VARS|OPAM_SWITCH_PREFIX|${OPAM}" +unset OPAM_SWITCH_PREFIX; +unset NV_VARS; ### opam exec -- env | grep '^NV_VARS|^OPAM_SWITCH_PREFIX|${OPAM}' NV_VARS=hej!! OPAM=${OPAM} @@ -67,14 +67,14 @@ set -gx NV_VARS 'hej!!'; setenv OPAM_SWITCH_PREFIX '${BASEDIR}/OPAM/conffile'; setenv NV_VARS 'hej!!'; ### opam exec -- opam env --revert --shell=bash | grep -v PATH -OPAM_SWITCH_PREFIX=''; export OPAM_SWITCH_PREFIX; -NV_VARS=''; export NV_VARS; +unset OPAM_SWITCH_PREFIX; +unset NV_VARS; ### opam exec -- opam env --revert --shell=zsh | grep -v PATH -OPAM_SWITCH_PREFIX=''; export OPAM_SWITCH_PREFIX; -NV_VARS=''; export NV_VARS; +unset OPAM_SWITCH_PREFIX; +unset NV_VARS; ### opam exec -- opam env --revert --shell=fish | grep -v PATH -set -gx OPAM_SWITCH_PREFIX ''; -set -gx NV_VARS ''; +set -ge OPAM_SWITCH_PREFIX; +set -ge NV_VARS; ### opam exec -- opam env --revert --shell=csh | grep -v PATH -setenv OPAM_SWITCH_PREFIX ''; -setenv NV_VARS ''; +unsetenv OPAM_SWITCH_PREFIX; +unsetenv NV_VARS;