Skip to content

Commit

Permalink
Test revert when setenv package uninstalled
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Mar 14, 2023
1 parent 1a7657e commit 09284a1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/reftests/env.test
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,20 @@ Switch invariant: ["nv"]
-> installed nv.1
Done.
# Run eval $(opam env '--root=${BASEDIR}/root 2' '--switch=${BASEDIR}/switch w spaces') to update the current shell environment
### opam switch create full-revert --empty
# Run eval $(opam env --switch=full-revert) to update the current shell environment
### opam install nv
The following actions will be performed:
=== install 1 package
- install nv 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed nv.1
Done.
# Run eval $(opam env) to update the current shell environment
### opam exec -- opam env --revert | grep "NV_VARS" | ';' -> ':'
NV_VARS3='/yet/another/different/path': export NV_VARS3:
NV_VARS4='': export NV_VARS4:
### opam exec -- sh -c "opam remove nv ; opam env --revert" | grep "NV_VARS" | ';' -> ':'
NV_VARS3='/yet/another/different/path': export NV_VARS3:
NV_VARS4='': export NV_VARS4:

0 comments on commit 09284a1

Please sign in to comment.