]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - tests/_autoenv_utils.t
_autoenv_get_file_upwards: do not dereference symlinks (#73)
[zsh-autoenv.git] / tests / _autoenv_utils.t
index a23f18990528157f63306dbd574b2723b74c64ef..c77779f969a6cf108b20ac4988323b424a181199 100644 (file)
@@ -17,6 +17,15 @@ Should not get the file from the current dir.
   $ _autoenv_get_file_upwards $PWD file
   */_autoenv_utils.t/sub/file (glob)
 
+_autoenv_get_file_upwards should not dereference symlinks.
+
+  $ cd ../..
+  $ ln -s sub symlink
+  $ cd symlink/sub2
+  $ _autoenv_get_file_upwards . file
+  ../file
+  $ _autoenv_get_file_upwards $PWD file
+  */_autoenv_utils.t/symlink/file (glob)
 
 Tests for _autoenv_authorize. {{{