mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-09-28 17:31:05 +03:00
bcec00d2dd
- s/DOTENV_/AUTOENV_/ - s/dotenv_/autoenv_/ Ref: https://github.com/Tarrasch/zsh-autoenv/issues/6
31 lines
458 B
Perl
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
|