1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-06-16 23:00:12 +03:00
zsh-autoenv/tests/varstash.t
Daniel Hahler bcec00d2dd Use AUTOENV prefix
- s/DOTENV_/AUTOENV_/
 - s/dotenv_/autoenv_/

Ref: https://github.com/Tarrasch/zsh-autoenv/issues/6
2014-11-24 20:13:18 +01:00

31 lines
458 B
Perl

Test varstash integration.
$ source $TESTDIR/setup.sh
Setup test environment.
$ mkdir sub
$ cd sub
$ echo "autostash FOO=baz" > $AUTOENV_FILE_ENTER
$ echo "autounstash" > $AUTOENV_FILE_LEAVE
Manually create auth file
$ test_autoenv_auth_env_files
Set environment variable.
$ FOO=bar
Activating the env stashes it and applies a new value.
$ cd .
$ echo $FOO
baz
Leaving the directory unstashes it.
$ cd ..
$ echo $FOO
bar