From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Inconsistency of GLOB_ASSIGN
Date: Fri, 28 Nov 2014 10:39:26 -0800 [thread overview]
Message-ID: <141128103926.ZM19200@torch.brasslantern.com> (raw)
In-Reply-To: <20141128093420.4fbeab70@pwslap01u.europe.root.pri>
On Nov 28, 9:34am, Peter Stephenson wrote:
}
} Given there not much difference, it would probably be better to stick
} with the one that does scalar assignment in the case of a single entry.
OK, here's a test. Is the floating point output of "typeset -p"
consistent, or are there going to be platform differences that require
a different parse? (I stuck with a power of 2 to avoid rounding.)
diff --git a/Test/A06assign.ztst b/Test/A06assign.ztst
index 9a0a4f0..3c9ea08 100644
--- a/Test/A06assign.ztst
+++ b/Test/A06assign.ztst
@@ -1,5 +1,10 @@
# Tests of parameter assignments
+%prep
+ mkdir assign.tmp && cd assign.tmp
+
+ touch tmpfile1 tmpfile2
+
%test
typeset -A assoc
@@ -413,3 +418,18 @@
>world
>worldliness
>world
+
+ integer i n x
+ float f
+ setopt globassign
+ i=tmpfile1
+ n=tmp*
+ x=*2
+ f=2+2
+ typeset -p i n x f
+0:GLOB_ASSIGN with numeric types
+>typeset -i i=0
+>typeset -a n
+>n=(tmpfile1 tmpfile2)
+>typeset x=tmpfile2
+>typeset -E f=4.000000000e+00
prev parent reply other threads:[~2014-11-28 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 5:57 Bart Schaefer
2014-11-27 20:43 ` Peter Stephenson
2014-11-27 20:51 ` Bart Schaefer
2014-11-27 21:38 ` Bart Schaefer
2014-11-27 23:00 ` Bart Schaefer
2014-11-28 9:34 ` Peter Stephenson
2014-11-28 18:39 ` Bart Schaefer [this message]
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=141128103926.ZM19200@torch.brasslantern.com \
--to=schaefer@brasslantern.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).