about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-01-25 16:23:16 +0000
committerPeter Stephenson <pws@zsh.org>2016-01-25 16:23:16 +0000
commit7c59c953f28026559325473ba53be0dd3a661109 (patch)
treee0eceda45c1f9a7dbfecad87883c9c93ccdaa0db /Test
parentbe32864e6ff6a872d63314b4baedbfbf2eed54bd (diff)
downloadzsh-7c59c953f28026559325473ba53be0dd3a661109.tar.gz
zsh-7c59c953f28026559325473ba53be0dd3a661109.tar.xz
zsh-7c59c953f28026559325473ba53be0dd3a661109.zip
37765: Use FS_FUNC on fucstack to find autoload -X target.
This is better than scriptname which can be updated due to e.g.
intervening "eval".
Diffstat (limited to 'Test')
-rw-r--r--Test/C04funcdef.ztst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst
index 0951e2cde..496577f6c 100644
--- a/Test/C04funcdef.ztst
+++ b/Test/C04funcdef.ztst
@@ -308,6 +308,19 @@
 ?(eval):6: command not found: firstfn1
 ?(eval):7: command not found: secondfn1
 
+  (
+    fpath=(.)
+    print  "print oops was successfully autoloaded" >oops
+    oops() { eval autoload -X }
+    oops
+    which -x2 oops
+  )
+0:autoload containing eval
+>oops was successfully autoloaded
+>oops () {
+>  print oops was successfully autoloaded
+>}
+
 %clean
 
  rm -f file.in file.out