Subject: Re: How do I run tests under Valgrind?

From: Stefano Lattarini <[email-masked]>
Date: Fri, 21 Sep 2012 22:13:09 +0200

On 09/21/2012 09:58 PM, Ramkumar Ramachandra wrote:
> Hi again,
> 
> Ramkumar Ramachandra wrote:
>> I was able to reproduce the problem on all my machines, and I consider
>> this very disturbing.  However, I was successfully able to corner the
>> issue. I have an overtly long $PATH that's not getting split properly
>> by `IFS=:` in one corner case -- in other words, this shell script
>> fails to execute properly when called with `--tee` (just set a really
>> long $PATH and try):
> 
> Oops.  Looks like it has nothing to do with an overtly long $PATH.  It
> has something to do with $SHELL being zsh though, because other shells
> work.  Looking deeper into this.
> 
Zsh doesn't do word-splitting by default on variable expansions:

    $ zsh -c 'v="1 2 3"; for x in $v; do echo "$x"; done'
    1 2 3

unless you set the SH_WORD_SPLIT option, or put Zsh in Bourne-compatibility
mode somehow:

    $ zsh -o SH_WORD_SPLIT -c 'v="1 2 3"; for x in $v; do echo "$x"; done'
    1
    2
    3

    $ zsh -c 'emulate sh; v="1 2 3"; for x in $v; do echo "$x"; done'
    1
    2
    3

More info at: <http://zsh.sourceforge.net/FAQ/zshfaq02.html>

HTH,
  Stefano