* Re: zsh (live version): setting globassign crashes completion
[not found] ` <CAHYJk3QDmytycz+A=bP7rKnVsYK_MYcGWg6sjQskhwtPwWggnw@mail.gmail.com>
@ 2015-06-02 14:00 ` Peter Stephenson
2015-06-02 14:21 ` Mikael Magnusson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2015-06-02 14:00 UTC (permalink / raw)
To: Zsh Hackers' List
On Tue, 2 Jun 2015 15:45:09 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> My money is on
> "33816, 33819: GLOB_ASSIGN changes integer and floating type variables
> to string scalars"
> I checked that my patch still passes the test added by those patches,
> and it does.
(Moved to zsh-workers.)
Ick.
We'd better do this, too.
pws
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 5c453c8..195ce56 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -483,6 +483,14 @@
>tmpcd tmpfile1 tmpfile2
>tmp*
+ (setopt globassign
+ typeset -A foo
+ touch gatest1 gatest2
+ foo=(gatest*)
+ print ${(t)foo})
+0:GLOB_ASSIGN doesn't monkey with type if not scalar assignment.
+>association-local
+
mkdir onlysomefiles
touch onlysomefiles/.thisfile onlysomefiles/thatfile
setopt globdots
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh (live version): setting globassign crashes completion
2015-06-02 14:00 ` zsh (live version): setting globassign crashes completion Peter Stephenson
@ 2015-06-02 14:21 ` Mikael Magnusson
2015-06-02 14:25 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2015-06-02 14:21 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Zsh Hackers' List
On Tue, Jun 2, 2015 at 4:00 PM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Tue, 2 Jun 2015 15:45:09 +0200
> Mikael Magnusson <mikachu@gmail.com> wrote:
>> My money is on
>> "33816, 33819: GLOB_ASSIGN changes integer and floating type variables
>> to string scalars"
>> I checked that my patch still passes the test added by those patches,
>> and it does.
>
> (Moved to zsh-workers.)
>
> Ick.
>
> We'd better do this, too.
>
> pws
>
> diff --git a/Test/E01options.ztst b/Test/E01options.ztst
> index 5c453c8..195ce56 100644
> --- a/Test/E01options.ztst
> +++ b/Test/E01options.ztst
> @@ -483,6 +483,14 @@
> >tmpcd tmpfile1 tmpfile2
> >tmp*
>
> + (setopt globassign
> + typeset -A foo
> + touch gatest1 gatest2
> + foo=(gatest*)
> + print ${(t)foo})
> +0:GLOB_ASSIGN doesn't monkey with type if not scalar assignment.
> +>association-local
> +
> mkdir onlysomefiles
> touch onlysomefiles/.thisfile onlysomefiles/thatfile
> setopt globdots
Hm, there's one GLOB_ASSIGN test in A06 and one in E01, should we move
them together? Also, my patch had some unrelated gunk in the context,
sorry about that.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh (live version): setting globassign crashes completion
2015-06-02 14:21 ` Mikael Magnusson
@ 2015-06-02 14:25 ` Peter Stephenson
2015-06-02 15:12 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2015-06-02 14:25 UTC (permalink / raw)
To: Zsh Hackers' List
On Tue, 2 Jun 2015 16:21:25 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> Hm, there's one GLOB_ASSIGN test in A06 and one in E01, should we move
> them together? Also, my patch had some unrelated gunk in the context,
> sorry about that.
A06 might be better --- the other tests are more closely relevant ---
but we could leave a note in E01 that this has happened to avoid
future duplication.
pws
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: zsh (live version): setting globassign crashes completion
2015-06-02 14:25 ` Peter Stephenson
@ 2015-06-02 15:12 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2015-06-02 15:12 UTC (permalink / raw)
To: Zsh Hackers' List
diff --git a/Test/A06assign.ztst b/Test/A06assign.ztst
index 0ad9a0a..a4401cb 100644
--- a/Test/A06assign.ztst
+++ b/Test/A06assign.ztst
@@ -419,14 +419,14 @@
>worldliness
>world
- integer i n x
+ (integer i n x
float f
setopt globassign
i=tmpfile1
- n=tmp*
+ n=tmpf*
x=*2
f=2+2
- typeset -p i n x f
+ typeset -p i n x f)
0:GLOB_ASSIGN with numeric types
>typeset -i i=0
>typeset -a n
@@ -434,6 +434,25 @@
>typeset x=tmpfile2
>typeset -E f=4.000000000e+00
+ setopt globassign
+ foo=tmpf*
+ print $foo
+ unsetopt globassign
+ foo=tmpf*
+ print $foo
+0:GLOB_ASSIGN option
+>tmpfile1 tmpfile2
+>tmpf*
+
+ (setopt globassign
+ typeset -A foo
+ touch gatest1 gatest2
+ foo=(gatest*)
+ print ${(t)foo}
+ rm -rf gatest*)
+0:GLOB_ASSIGN doesn't monkey with type if not scalar assignment.
+>association-local
+
A=(first second)
A="${A[*]}" /bin/sh -c 'echo $A'
print -l "${A[@]}"
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 5c453c8..d64f7ac 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -473,15 +473,7 @@
>outside2 scalar
>inside3 scalar-export
- setopt globassign
- foo=tmp*
- print $foo
- unsetopt globassign
- foo=tmp*
- print $foo
-0:GLOB_ASSIGN option
->tmpcd tmpfile1 tmpfile2
->tmp*
+# GLOB_ASSIGN is tested in A06assign.ztst.
mkdir onlysomefiles
touch onlysomefiles/.thisfile onlysomefiles/thatfile
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-02 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <556D9EBE.4050702@gmail.com>
[not found] ` <20150602143606.346a5abc@pwslap01u.europe.root.pri>
[not found] ` <CAHYJk3QDmytycz+A=bP7rKnVsYK_MYcGWg6sjQskhwtPwWggnw@mail.gmail.com>
2015-06-02 14:00 ` zsh (live version): setting globassign crashes completion Peter Stephenson
2015-06-02 14:21 ` Mikael Magnusson
2015-06-02 14:25 ` Peter Stephenson
2015-06-02 15:12 ` Peter Stephenson
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).