]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - tests/setup.zsh
Cleanup API/vars for enter/leave events
[zsh-autoenv.git] / tests / setup.zsh
index bead06856e98d10b4c2a46aedc42043ecab3a67f..316074de972983fae62b2a4bd3c8d0cc55884f7e 100644 (file)
@@ -33,8 +33,9 @@ test_autoenv_add_to_env() {
 
 # Add enter and leave env files to authentication file.
 test_autoenv_auth_env_files() {
-  test_autoenv_add_to_env $PWD/$AUTOENV_FILE_ENTER
-  test_autoenv_add_to_env $PWD/$AUTOENV_FILE_LEAVE
+  local dir=${1:-$PWD}
+  test_autoenv_add_to_env $dir/$AUTOENV_FILE_ENTER
+  test_autoenv_add_to_env $dir/$AUTOENV_FILE_LEAVE
 }
 
 # Now keep on going on errors again.