about summary refs log tree commit diff
path: root/Test/E02xtrace.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/E02xtrace.ztst')
-rw-r--r--Test/E02xtrace.ztst34
1 files changed, 34 insertions, 0 deletions
diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst
index da6191cd0..a5a7bc55c 100644
--- a/Test/E02xtrace.ztst
+++ b/Test/E02xtrace.ztst
@@ -146,3 +146,37 @@
 ?+(anon):0> '(anon)'
 ?+(anon):0> true
 ?+fn:0> gn
+
+  test_cases=(
+      f            # baseline
+      foo-bar      # Dash
+      ヌ           # Meta (the UTF-8 representation of this character has an 0x83 byte)
+      \$\'ba\\0z\' # Nul, escaped as though by ${(qqqq)}
+  )
+  for 1 in "$test_cases[@]"; do
+    eval "
+      ${1}() {
+        ${1}() { echo inner }
+      }
+      functions -T ${1}
+      ${1}
+      which ${1}
+    "
+  done
+0:a function that redefines itself preserves tracing
+>f () {
+>	# traced
+>	echo inner
+>}
+>foo-bar () {
+>	# traced
+>	echo inner
+>}
+>$'\M-c\M-\C-C\M-\C-L' () {
+>	# traced
+>	echo inner
+>}
+>$'ba\C-@z' () {
+>	# traced
+>	echo inner
+>}