summaryrefslogtreecommitdiffstats
path: root/Test/C04funcdef.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-01-12 13:54:29 +0000
committerPeter Stephenson <pws@zsh.org>2017-01-12 13:54:29 +0000
commit33799ae2b00c09445e2e47720bc740ec434416e4 (patch)
tree5ad8280e25112174a72c7924d637fb9fd44db2b3 /Test/C04funcdef.ztst
parent40333: Fix the watch interface for utmpx (diff)
downloadzsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.gz
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.bz2
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.lz
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.xz
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.tar.zst
zsh-33799ae2b00c09445e2e47720bc740ec434416e4.zip
40335: More care with autoload function path.
If doing "autoload -X", the path present might actually be location of file containing the function with the autoload -X. Add an explicit flag to say it's a directory for autoload.
Diffstat (limited to 'Test/C04funcdef.ztst')
-rw-r--r--Test/C04funcdef.ztst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 1821b786e..7100280f3 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -419,6 +419,16 @@
0:autoload -dX with path
>I have been loaded by default path.
+ (
+ fpath=(.)
+ print 'loadthisfunc() { autoload -X }' >loadthisfunc_sourceme
+ print 'print Function was loaded correctly.' >loadthisfunc
+ source $PWD/loadthisfunc_sourceme
+ loadthisfunc
+ )
+0: autoload -X interaction with absolute filename used for source location
+>Function was loaded correctly.
+
%clean
rm -f file.in file.out