unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r114276: * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop):
       [not found] <E1VKWwO-0007KU-0N@vcs.savannah.gnu.org>
@ 2013-09-13 19:03 ` Stefan Monnier
  2013-09-13 19:15   ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2013-09-13 19:03 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> +  (let ((process-environment (cons "foo" process-environment)))
> +    (should (equal (eshell-test-command-result
> +                    "for foo in 5 { echo $foo }") 5))))

The $foo above should never be able to refer to an env-var (the local
"for binding" should always take precedence).  If not, it's a bug.
So I think that instead of removing any `foo' from the environment, we
should on the contrary add a `foo' binding in the process-environment to
make sure that the local binding takes precedence.


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] trunk r114276: * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop):
  2013-09-13 19:03 ` [Emacs-diffs] trunk r114276: * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop): Stefan Monnier
@ 2013-09-13 19:15   ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-09-13 19:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

>> +  (let ((process-environment (cons "foo" process-environment)))
>> +    (should (equal (eshell-test-command-result
>> +                    "for foo in 5 { echo $foo }") 5))))
>
> The $foo above should never be able to refer to an env-var (the local
> "for binding" should always take precedence).  If not, it's a bug.

(Oh, now I see what you meant by "I saw this email too late".
Seems we read mailing lists in different order of precedence. :) )

Yeah, it's a different, long-standing eshell bug.
http://debbugs.gnu.org/15372

I just papered over it in the tests for now.
When it gets fixed, it can have its own test.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-13 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1VKWwO-0007KU-0N@vcs.savannah.gnu.org>
2013-09-13 19:03 ` [Emacs-diffs] trunk r114276: * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop): Stefan Monnier
2013-09-13 19:15   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).