[darcs-users] darcs patch: tests/*: refactor remaining IFS calls to lib
Gwern Branwen
gwern0 at gmail.com
Mon Dec 1 16:56:47 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Mon, Dec 1, 2008 at 10:47 AM, Eric Kow wrote:
> Ah, I was just about to write you to report that tests are still passing
> after your first patch.
>
> But are you sure this is a good idea, below, to effectively make /every/
> test set IFS=''?
>
> The bash manpage says:
>
> IFS The Internal Field Separator that is used for word splitting
> after expansion and to split lines into words with the read
> builtin command. The default value is '' line>''.
>
> I confess that I still don't fully understand the consquences of this.
> One thing I'm worried about is breaking other non-IFS-y tests. Another
> deeper worry is that we start (unknowingly) writing tests that depend
> on this behaviour.
>
> What do you think?
(Sorry about the previous email, I pressed the wrong buttons.)
Points:
1) Only lib callers are affected.
2) Should any of our scripts be calling read?
3) Each test should be running in its own shell or subshell for
maximum separation.
4) We can conditionally set IFS on Windows, ie.
if echo $OS | grep -i windows; then
IFS=''
fi
- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEAREKAAYFAkk0F00ACgkQvpDo5Pfl1oJELQCeLy/MTVHG/st/sm9KDnz5Od6t
DLkAnjZJ5+u3c5N5t6OEk0l314F0ggNP
=PTyu
-----END PGP SIGNATURE-----
More information about the darcs-users
mailing list