From: Sebastian Gniazdowski <psprint3@fastmail.com>
To: zsh-workers@zsh.org
Subject: [PATCH] Extend (z) test with data that seemed to cause fail
Date: Thu, 09 Mar 2017 00:16:36 -0800 [thread overview]
Message-ID: <1489047396.3111577.905507696.636B7461@webmail.messagingengine.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
Hello,
I have a finished script where I use (z). I once feed it a data:
^FZUI^_ text-field example:
^Zzuitfieldtfield1_1^Z''^Z''^Z1^ZZUI\[my_tfield1_width\]^ZZUI\[my_tfield1_start\]^ZZUI\[my_tfield1_data\]^\
on which for 4th "^Z..." segment it was returning multiple segments.
This happened for 5 minutes, then it stopped. Because I wasn't touching
the script-black-box, I think it's really a (z) thing. I suspect some
missing "calloc" instead of "malloc", etc. So maybe it's worth adding
this test case (patch attached) to D04parameter with this exact data:
foo="^FZUI^_ text-field example:
^Zzuitfieldtfield1_1^Z''^Z''^Z1^ZZUI\[my_tfield1_width\]^ZZUI\[my_tfield1_start\]^ZZUI\[my_tfield1_data\]^\"
print "${#${(z@)foo}}"
0:Test real-world data that once seemed to fail
>4
--
Sebastian Gniazdowski
psprint3@fastmail.com
[-- Attachment #2: z_realworld.diff --]
[-- Type: text/plain, Size: 490 bytes --]
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index fba95cc..ec799f2 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -640,6 +640,11 @@
>echo
>$(|||) bar
+ foo="\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a''\x1a''\x1a1\x1aZUI\[my_tfield1_width\]\x1aZUI\[my_tfield1_start\]\x1aZUI\[my_tfield1_data\]\x1c"
+ print "${#${(z@)foo}}"
+0:Test real-world data that once seemed to fail
+>4
+
psvar=(dog)
setopt promptsubst
foo='It shouldn'\''t $(happen) to a %1v.'
next reply other threads:[~2017-03-09 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170309082643epcas1p442c9a88050e6607dc8eeb9e9138e8068@epcas1p4.samsung.com>
2017-03-09 8:16 ` Sebastian Gniazdowski [this message]
2017-03-09 10:05 ` Peter Stephenson
2017-03-09 11:32 ` Sebastian Gniazdowski
2017-03-09 11:49 ` Peter Stephenson
2017-03-10 4:35 ` Bart Schaefer
2017-03-10 10:57 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489047396.3111577.905507696.636B7461@webmail.messagingengine.com \
--to=psprint3@fastmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).