[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r37008 - trunk/subversion/tests/cmdline/svntest

From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA_at_GMail.Com>
Date: Sun, 5 Apr 2009 23:10:24 +0200

2009-04-05 23:06:14 Branko Čibej napisał(a):
> Arfrever Frehtes Taifersar Arahesis wrote:
> > I have found a computer with Windows system, I installed Python on that system
> > and I tested opening some test files with different line endings.
> > When opening a file [1] with either "\r\n" or "\n" or mixed line endings in text mode,
> > and reading it, all line endings were automatically transformed into "\n". There
> > were no errors. When opening in binary mode [2], actual line endings were used.
> > Replacing of line endings [3] was working correctly.
> >
> > [1] open(file, "r").read()
> > [2] open(file, "rb").read()
> > [3] open(file, "rb").read().replace("\r\n", "\n")
> >
>
> Sorry, how is that relevant? Anyone who knows anything about how
> text-mode files work already knows this.

Bert Huijben claimed that opening a file with "\n" line endings on Windows
would cause some errors (maybe exceptions throwed by 'raise' from Python internal
modules).

> You're making the tests less useful by hiding potential errors.

What potential errors?

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2009-04-05 23:10:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.