X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=tests%2Fvarstash.t;h=dd730c468ed3d348d7d6f72ddec1cdc09ab210ff;hb=ecf2b2961f1051de5b6b3adfec05ef0cb58b8cff;hp=b75aa59690fc51c2d84166b2cbeb11c9f1124bc1;hpb=f021750e899f483c40691c42cf1f3988fa614f47;p=zsh-autoenv.git diff --git a/tests/varstash.t b/tests/varstash.t index b75aa59..dd730c4 100644 --- a/tests/varstash.t +++ b/tests/varstash.t @@ -6,11 +6,22 @@ Setup test environment. $ mkdir sub $ cd sub - $ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER - $ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE -Manually create auth file +The varstash library should not get loaded always. + $ echo 'echo ENTER' > $AUTOENV_FILE_ENTER + $ echo 'echo LEAVE' > $AUTOENV_FILE_LEAVE + $ test_autoenv_auth_env_files + $ cd . + ENTER + $ type -w autostash + autostash: none + [1] + +Now on to some stashing. + + $ echo 'echo ENTER; autostash FOO=changed' > $AUTOENV_FILE_ENTER + $ echo 'echo LEAVE; autounstash' > $AUTOENV_FILE_LEAVE $ test_autoenv_auth_env_files Set environment variable. @@ -19,8 +30,12 @@ Set environment variable. Activating the env stashes it and applies a new value. - $ cd . + $ cd .. + LEAVE + $ cd sub ENTER + $ type -w autostash + autostash: function $ echo $FOO changed