1 Test varstash integration.
3 $ source $TESTDIR/setup.zsh || return 1
5 Setup test environment.
9 $ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER
10 $ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE
12 Manually create auth file
14 $ test_autoenv_auth_env_files
16 Set environment variable.
20 Activating the env stashes it and applies a new value.
27 Leaving the directory unstashes it.
35 Test autounstashing when leaving a directory. {{{
42 $ echo 'echo ENTER; autostash VAR=changed' >| $AUTOENV_FILE_ENTER
43 $ echo 'echo LEAVE; echo "no explicit call to autounstash"' >| $AUTOENV_FILE_LEAVE
44 $ test_autoenv_auth_env_files
51 Trigger the autostashing in the enter file.
55 no explicit call to autounstash
65 no explicit call to autounstash
69 Remove the leave file, auto-unstashing should still happen.
71 $ rm sub/$AUTOENV_FILE_LEAVE
80 And once again where a value gets restored.