This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: wordexp IFS fixes


Tim Waugh <tim@cyberelk.demon.co.uk> writes:

> I've fixed a couple of bugs in wordexp to do with IFS handling, and added
> the relevant tests.

Thanks, it's in.

> There's another case I'd like to add a test for, but I'm not quite sure
> what the outcome should be!
> 
> If IFS=':', how many words would you expect ":abc:" to expand to?  
> wordexp currently says 1 ("abc"), which is certainly wrong; bash seems to
> say 2 ("" and "abc"), and the spec (or what I have of it) would seem to
> say 3 ("", "abc", and "").  I expect that I've misread the spec..

We don't have many comparisons available.  All systems I've tried
(Solaris, DU, Irix) completely fail to recognize IFS.  Loosers.

I agree with you that the solution with 3 entries is the right one and
we should implement this even though bash does it differently.  And
Chet should get a bug report for bash.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]