]> Sergey Matveev's repositories - zsh-autoenv.git/blob - tests/varstash.t
Cleanup
[zsh-autoenv.git] / tests / varstash.t
1 Test varstash integration.
2
3   $ source $TESTDIR/setup.sh
4
5 Setup test environment.
6
7   $ mkdir sub
8   $ cd sub
9   $ echo "autostash FOO=baz" > $DOTENV_FILE_ENTER
10   $ echo "autounstash" > $DOTENV_FILE_LEAVE
11
12 Manually create auth file
13
14   $ test_autoenv_auth_env_files
15
16 Set environment variable.
17
18   $ FOO=bar
19
20 Activating the env stashes it and applies a new value.
21
22   $ cd .
23   $ echo $FOO
24   baz
25
26 Leaving the directory unstashes it.
27
28   $ cd ..
29   $ echo $FOO
30   bar