Re: How do I run tests under Valgrind?
- From
Stefano Lattarini <stefano.lattarini@gmail.com>
- Date
- Sep 21, 2012, 20:13 UTC
- Message-ID
- <505CCA55.6030609@gmail.com>
- In-Reply-To
- <CALkWK0kWvrirPjXXzBBBQxKDcwpd_+nQ2eeT6SE8gDFW5T7WFQ@mail.gmail.com>
On 09/21/2012 09:58 PM, Ramkumar Ramachandra wrote:
Show 14 quoted lines
> 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 3unless 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
3More info at: <http://zsh.sourceforge.net/FAQ/zshfaq02.html>
HTH, Stefano