Re: Common pool of examples and validation

On Tuesday 2007-06-12 23:18 +0100, Ben 'Cerbera' Millard wrote:
> I like the idea of doing this in as simple a format as possible. Would 
> CRLF-terminated lines be acceptable? Newline normalisation is easy when 
> processing files; there's even a spec for it [2]. But authoring LF-only 
> lines is troublesome in Windows (which I use).

Version control systems often handle this for you.  Many version
control systems, on Windows (some configurations/variants of CVS,
subversion, etc.) will handle conversion of LF to/from CRLF for text
files, allowing people on multiple operating systems to keep the
repository in a consistent state while having their working tree
entirely in their preferred state.  This means you'd have
CRLF-termination for files committed by a Linux user who wrote
LF-terminated files.

I've often found it's less troublesome to worry about newline
normalization when putting things into a repository (of tests, in
this case) than when getting them out.

(Windows users still sometimes need to be a little careful, since
windows uses CRLF-*separation*, and Unix uses LF-*termination*, so
Windows users sometimes produce files missing the critical final
newline, which actually breaks a bunch of common command-line tools,
like sed.)

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Wednesday, 13 June 2007 06:38:31 UTC