summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorPhilippe Altherr <philippe.altherr@gmail.com>2026-07-26 21:22:48 -0700
committerBart Schaefer <schaefer@zsh.org>2026-07-26 21:22:48 -0700
commit9a9af70296bfbdb5be1d9521415d87fd4accaa34 (patch)
treed28b1ed11df792b9e2c9c8a262f08b218036f452 /Test
parent55036: refinements to "typeset -gh" tests (diff)
downloadzsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar.gz
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar.bz2
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar.lz
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar.xz
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.tar.zst
zsh-9a9af70296bfbdb5be1d9521415d87fd4accaa34.zip
55021: prevent segfault upon "typeset -U" of a tied array hidden by a local
Diffstat (limited to 'Test')
-rw-r--r--Test/B02typeset.ztst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index cec82dea8..8b66c184f 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -301,6 +301,20 @@
>local unique tied array SCALAR
>array local tied SCALAR array
+ typeset -T VAR var=(a b c b a)
+ () {
+ typeset -i var=1
+ typeset -g -U VAR
+ typeset -p VAR var
+ }
+ typeset -p VAR var
+0:Regression test for not segfaulting when uniquifying a hidden tied array
+F:BUG:The inner "typeset -p VAR" should contain the value of the outer "var"
+>typeset -g -UT VAR var=1
+>typeset -i var=1
+>typeset -UT VAR var=( a b c )
+>typeset -aT VAR var=( a b c )
+
typeset -T SCALAR array
typeset +T SCALAR
1:Untying is prohibited