summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Gniazdowski <psprint@zdharma.org>2017-03-29 09:04:18 +0200
committerPeter Stephenson <pws@zsh.org>2017-03-30 12:16:24 +0100
commit5aec3f974279973091de4974bbd41b765bbc435b (patch)
tree6738d802209a6d2fbd148ff4a9a1624c81d5903b
parent5a895a5260b62c70e4aafb2d6be0e677667886d2 (diff)
downloadzsh-5aec3f974279973091de4974bbd41b765bbc435b.tar.gz
zsh-5aec3f974279973091de4974bbd41b765bbc435b.zip
40909: Stress test for parameter substitution
-rw-r--r--ChangeLog5
-rw-r--r--Test/D04parameter.ztst12
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a94128ea2..d3a3d9f58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-30 Peter Stephenson <p.stephenson@samsung.com>
+
+ * Sebastian: 40909: Test/D04parameter.ztst: stress test for
+ parameter substitution.
+
2017-03-27 Peter Stephenson <p.stephenson@samsung.com>
* 40906: Doc/Zsh/expn.yo: array subst needs [*] or [@] with
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 66d9022e2..d5798b5b9 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -2168,3 +2168,15 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
>x
>x
>y
+
+ my_width=6
+ my_index=1
+ my_options=Option1
+ hyperlink=$'\034'"MYID"$'\034'"DATA1"$'\034'"DATA2"$'\034'"DATA3"$'\034'"my_width"$'\034'"my_index"$'\034'"my_options"$'\02'
+ array=( $hyperlink "Regular text" $hyperlink )
+ array=( "${array[@]//(#b)$'\034'[^$'\034']#$'\034'[^$'\034']#$'\034'[^$'\034']#$'\034'[^$'\034']#$'\034'([^$'\034']#)$'\034'([^$'\034']#)$'\034'([^$'\02']#)$'\02'/${(mr:${(P)${(Q)match[1]}}:: :)${(As:;:)${(P)${(Q)match[3]}}}[${(P)${(Q)match[2]}}]}}" )
+ print -rl -- "${array[@]}"
+0:Test substitution that uses P,Q,A,s,r,m flags
+>Option
+>Regular text
+>Option