Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 63662 invoked from network); 23 Sep 2003 10:42:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Sep 2003 10:42:53 -0000 Received: (qmail 27020 invoked by uid 500); 23 Sep 2003 10:42:51 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 26797 invoked by uid 500); 23 Sep 2003 10:42:50 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 26783 invoked from network); 23 Sep 2003 10:42:49 -0000 Received: from unknown (HELO corvil.com) (213.94.219.177) by daedalus.apache.org with SMTP; 23 Sep 2003 10:42:49 -0000 Received: from preilly.local.corvil.com (preilly.local.corvil.com [172.18.1.173]) by corvil.com (8.12.9/8.12.5) with ESMTP id h8NAgkxe043177 for ; Tue, 23 Sep 2003 11:42:47 +0100 (IST) (envelope-from peter.reilly@corvil.com) From: peter reilly Organization: corvil To: Ant Developers List Subject: Re: ReplaceTest failing under cygwin Date: Tue, 23 Sep 2003 11:42:42 +0100 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200309231142.42570.peter.reilly@corvil.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Tuesday 23 September 2003 11:23, Antoine L=E9vy-Lambert wrote: > ReplaceTest fails under cygwin. > [junit] Testcase: test9 took 0,13 sec > [junit] FAILED [junit] expected:<10> but was:<13> > [junit] junit.framework.AssertionFailedError: expected:<10> but > was:<13> > > This has to do with the fact that the Replace task changes the line endin= gs > of tokens and values to System.getProperty("line.separator"), but that the > files used for the tests are terminated with \n only when one uses the > cvs.exe of cygwin. > > I can think of several ways of fixing this : > > - the easiest would be to change the Replace task, not to touch the line > endings of tokens and values at all. After all, I do not know why they get > such a special treatment. But this would also be a backward incompatible > change, > > - adding an enumerated attribute eol (like in the fixcrlf task) to the > nested elements , , . Like = in > the fixcrlf task, the platform's line separator would be the default ther= e, > and "asis" would be used to run the test(s) with predictable results. =2D Change the test... or declare the failure invalid. The test checks line ending without having control of the lineendings as on windows, the cvs client may or may not add 's to files. For text files it should, but cygwin's cvs client does not do this. A simple fix is to use a cvs client that respects crazy windows/dos behaviour (cvsnt is the one I used when I was on NT). The test could write the expected result instead of using expected files in cvs. Peter > > Is the reason why line endings of tokens and values in are > manipulated that, when they are read from to ant \n as line separator also on Windows, which is generally not what = is > desired ? When on the contrary the replacetoken or replacevalue come from= a > property, the build file writer is fully in control of the flavour of the > line endings of the tokens and values and would not need any special > manipulation. > > Cheers, > > Antoine > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org