summaryrefslogtreecommitdiffstats
path: root/Test/E02xtrace.ztst
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-22 04:52:38 +0000
committerDaniel Shahaf <danielsh@apache.org>2019-12-26 04:20:10 +0000
commitca6f4466e661f185d083e09c55fb93d16e0736cc (patch)
tree62dfdb74ae41e805376dfefc409ad8469a434750 /Test/E02xtrace.ztst
parentunposted: _stdbuf: Fix mismatch between the long options on the one hand, and... (diff)
downloadzsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar.gz
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar.bz2
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar.lz
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar.xz
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.tar.zst
zsh-ca6f4466e661f185d083e09c55fb93d16e0736cc.zip
45131: Make a function that redefines itself preserve its tracedness.
This makes it easy to apply local tracing ('functions -T') to autoloadable functions that redefines themselves when first loaded.
Diffstat (limited to 'Test/E02xtrace.ztst')
-rw-r--r--Test/E02xtrace.ztst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst
index da6191cd0..8d2c300cf 100644
--- a/Test/E02xtrace.ztst
+++ b/Test/E02xtrace.ztst
@@ -146,3 +146,12 @@
?+(anon):0> '(anon)'
?+(anon):0> true
?+fn:0> gn
+
+ f() {
+ f() { echo inner }
+ }
+ functions -T f
+ f
+ which f | grep '# traced'
+0:a function that redefines itself preserves tracing
+> # traced