summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-22 06:53:58 +0000
committerDaniel Shahaf <danielsh@apache.org>2019-12-26 04:24:31 +0000
commitd9dd1b63e510057d16123a6deb4e4782884883d7 (patch)
tree8b494ec5639fb4c19372511a7ee6090c9a71e4b3
parent525faae5498adb4b4f1c0f4657b9ef71fc31c4d6 (diff)
downloadzsh-d9dd1b63e510057d16123a6deb4e4782884883d7.tar.gz
zsh-d9dd1b63e510057d16123a6deb4e4782884883d7.zip
unposted (follow-up to 45131): Extra testing by Mikael
-rw-r--r--ChangeLog3
-rw-r--r--Test/E02xtrace.ztst37
2 files changed, 34 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 321216c7a..c6504d882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2019-12-26 Daniel Shahaf <danielsh@apache.org>
+ * unposted (follow-up to 45131): Test/E02xtrace.ztst: Extra
+ testing by Mikael
+
* 45137: Src/Modules/zutil.c, Test/V13zformat.ztst: zformat:
Allow the specifying minimum width and a dot with an empty
maximum width.
diff --git a/Test/E02xtrace.ztst b/Test/E02xtrace.ztst
index 8d2c300cf..a5a7bc55c 100644
--- a/Test/E02xtrace.ztst
+++ b/Test/E02xtrace.ztst
@@ -147,11 +147,36 @@
?+(anon):0> true
?+fn:0> gn
- f() {
- f() { echo inner }
- }
- functions -T f
- f
- which f | grep '# traced'
+ 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
+>}